r40800 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40799‎ | r40800 | r40801 >
Date:00:39, 14 September 2008
Author:aaron
Status:old
Tags:
Comment:
more tweaks to catch the last svn rev
Modified paths:
  • /trunk/extensions/CodeReview/svnImport.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/svnImport.php
@@ -25,9 +25,10 @@
2626
2727 $startTime = microtime( true );
2828 $revCount = 0;
 29+$start = $lastStoredRev + 1;
2930
3031 echo "Syncing repo {$args[0]} from r$lastStoredRev to HEAD...\n";
31 -for( $start = $lastStoredRev + 1; $start < $lastRev; $start += $chunkSize ) {
 32+while( $start <= $lastRev ) {
3233 $log = $svn->getLog( '', $start, $start + $chunkSize - 1 );
3334 if( empty($log) ) {
3435 # Repo seems to give a blank when max rev is invalid, which
@@ -36,8 +37,9 @@
3738 if( $chunkSize <= 1 ) {
3839 die(); // done!
3940 }
40 - $start = max( $lastStoredRev + 1, $start - $chunkSize ); // Go back!
41 - $chunkSize = max( 1, floor($chunkSize/3) );
 41+ $chunkSize = max( 1, floor($chunkSize/4) );
 42+ } else {
 43+ $start += $chunkSize;
4244 }
4345 foreach( $log as $data ) {
4446 $revCount++;

Status & tagging log