r42575 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r42574‎ | r42575 | r42576 >
Date:20:53, 25 October 2008
Author:btongminh
Status:old (Comments)
Tags:
Comment:
Add quick script to update to the latest SVN version Wikimedia is using.
Modified paths:
  • /trunk/phase3/maintenance/scapToWikimedia.php (added) (history)

Diff [purge]

Index: trunk/phase3/maintenance/scapToWikimedia.php
@@ -0,0 +1,13 @@
 2+<?php
 3+
 4+require_once( dirname( __FILE__ ) . '/commandLine.inc');
 5+
 6+$url = 'http://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&format=php';
 7+$data = @unserialize( Http::get( $url ) );
 8+$rev = @$data['query']['general']['rev'];
 9+if ( !$rev )
 10+ die( "Unable to fetch latest SVN revision from {$url}\n" );
 11+
 12+print "Updating to revision {$rev}\n";
 13+chdir( dirname( __FILE__ ) . '/..' );
 14+system( "svn up -r {$rev}" );
Property changes on: trunk/phase3/maintenance/scapToWikimedia.php
___________________________________________________________________
Added: svn:eol-style
115 + native

Follow-up revisions

RevisionCommit summaryAuthorDate
r42591Backing out r42575 "Add quick script to update to the latest SVN version Wiki...brion02:27, 26 October 2008

Comments

#Comment by Brion VIBBER (talk | contribs)   02:25, 26 October 2008

This will update backwards as well as forwards, which is a little scary. :)

Since it could be pretty surprising and make your life harder to recover from if you run it by accident (losing mixed versions, encountering new update conflicts, etc), I'd recommend backing it out for now. Also 'scap' is a term of art specific to our deployment system, and is not used appropriately here. ;)

#Comment by Brion VIBBER (talk | contribs)   02:30, 26 October 2008

Reverted in r42591

Status & tagging log