r89187 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89186‎ | r89187 | r89188 >
Date:21:00, 30 May 2011
Author:reedy
Status:ok
Tags:
Comment:
More explicit code
Modified paths:
  • /trunk/extensions/CodeReview/svnImport.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/svnImport.php
@@ -33,14 +33,20 @@
3434 }
3535 }
3636
37 - $repo = $this->getArg();
 37+ $startRev = null;
 38+ if ( $this->hasArg( 1 ) ) {
 39+ $startRev = $this->getArg( 1 );
 40+ }
 41+
 42+ $repo = $this->getArg( 0 );
 43+
3844 if ( $repo == "all" ) {
3945 $repoList = CodeRepository::getRepoList();
4046 foreach ( $repoList as $repoInfo ) {
41 - $this->importRepo( $repoInfo->getName(), null, $cacheSize );
 47+ $this->importRepo( $repoInfo->getName(), $startRev, $cacheSize );
4248 }
4349 } else {
44 - $this->importRepo( $repo, $this->getArg( 1 ), $cacheSize );
 50+ $this->importRepo( $repo, $startRev, $cacheSize );
4551 }
4652 }
4753
@@ -69,6 +75,7 @@
7076 $startTime = microtime( true );
7177 $revCount = 0;
7278 $start = ( $start !== null ) ? intval( $start ) : $lastStoredRev + 1;
 79+
7380 /*
7481 * FIXME: when importing only a part of a repository, the given path
7582 * might not have been created with revision 1. For example, the

Follow-up revisions

RevisionCommit summaryAuthorDate
r89946[CodeReview] Follow-up to r89187. The start argument makes no sense when 'al...happydog06:56, 13 June 2011

Status & tagging log