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

Revision: 89947
Author:   happydog
Date:     2011-06-13 07:12:44 +0000 (Mon, 13 Jun 2011)
Log Message:
-----------
[CodeReview] The choice of which SVN adaptor to use is per-installation, not 
per-repo, therefore it is redundant to report this information for each 
repository (when being run with the 'all' parameter).  Now we only output the 
adaptor information the first time that importRepo() is called.

I also added a message so that the repo name is output before anything else.  
In some situations it was not being output at all (e.g. if the starting point 
was invalid) but in general it was being displayed too late in the process, 
which is very confusing when syncing multiple repos.

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

Modified: trunk/extensions/CodeReview/svnImport.php
===================================================================
--- trunk/extensions/CodeReview/svnImport.php   2011-06-13 06:56:19 UTC (rev 
89946)
+++ trunk/extensions/CodeReview/svnImport.php   2011-06-13 07:12:44 UTC (rev 
89947)
@@ -56,6 +56,7 @@
         */
        private function importRepo( $repoName, $start = null, $cacheSize = 0 ) 
{
                global $wgCodeReviewImportBatchSize;
+               static $adaptorReported = false;
 
                $repo = CodeRepository::newFromName( $repoName );
 
@@ -65,7 +66,12 @@
                }
 
                $svn = SubversionAdaptor::newFromRepo( $repo->getPath() );
-               $this->output( "Using " . get_class($svn). " adaptor\n" );
+               if ( !$adaptorReported ) {
+                       $this->output( "Using " . get_class($svn). " adaptor\n" 
);
+                       $adaptorReported = true;
+               }
+
+               $this->output( "IMPORT FROM REPO: $repoName\n" );
                $lastStoredRev = $repo->getLastStoredRev();
                $this->output( "Last stored revision: $lastStoredRev\n" );
 
@@ -85,7 +91,7 @@
                        return;
                }
 
-               $this->output( "Syncing repo $repoName from r$start to 
HEAD...\n" );
+               $this->output( "Syncing from r$start to HEAD...\n" );
 
                if ( !$svn->canConnect() ) {
                        $this->error( "Unable to connect to repository." );


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

Reply via email to