http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89187

Revision: 89187
Author:   reedy
Date:     2011-05-30 21:00:35 +0000 (Mon, 30 May 2011)
Log Message:
-----------
More explicit code

Modified Paths:
--------------
    trunk/extensions/CodeReview/svnImport.php

Modified: trunk/extensions/CodeReview/svnImport.php
===================================================================
--- trunk/extensions/CodeReview/svnImport.php   2011-05-30 20:28:52 UTC (rev 
89186)
+++ trunk/extensions/CodeReview/svnImport.php   2011-05-30 21:00:35 UTC (rev 
89187)
@@ -33,14 +33,20 @@
                        }
                }
 
-               $repo = $this->getArg();
+               $startRev = null;
+               if ( $this->hasArg( 1 ) ) {
+                       $startRev = $this->getArg( 1 );
+               }
+
+               $repo = $this->getArg( 0 );
+
                if ( $repo == "all" ) {
                        $repoList = CodeRepository::getRepoList();
                        foreach ( $repoList as $repoInfo ) {
-                               $this->importRepo( $repoInfo->getName(), null, 
$cacheSize );
+                               $this->importRepo( $repoInfo->getName(), 
$startRev, $cacheSize );
                        }
                } else {
-                       $this->importRepo( $repo, $this->getArg( 1 ), 
$cacheSize );
+                       $this->importRepo( $repo, $startRev, $cacheSize );
                }
        }
 
@@ -69,6 +75,7 @@
                $startTime = microtime( true );
                $revCount = 0;
                $start = ( $start !== null ) ? intval( $start ) : 
$lastStoredRev + 1;
+
                /*
                 * FIXME: when importing only a part of a repository, the given 
path
                 * might not have been created with revision 1. For example, the


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to