Add quick script to update to the latest SVN version Wikimedia is using.
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Sat, 25 Oct 2008 20:53:44 +0000 (20:53 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Sat, 25 Oct 2008 20:53:44 +0000 (20:53 +0000)
maintenance/scapToWikimedia.php [new file with mode: 0644]

diff --git a/maintenance/scapToWikimedia.php b/maintenance/scapToWikimedia.php
new file mode 100644 (file)
index 0000000..da99b28
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+
+require_once( dirname( __FILE__ ) . '/commandLine.inc');
+
+$url = 'http://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&format=php';
+$data = @unserialize( Http::get( $url ) );
+$rev = @$data['query']['general']['rev'];
+if ( !$rev )
+       die( "Unable to fetch latest SVN revision from {$url}\n" );
+
+print "Updating to revision {$rev}\n";
+chdir( dirname( __FILE__ ) . '/..' );
+system( "svn up -r {$rev}" );