r89947 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89946‎ | r89947 | r89948 >
Date:07:12, 13 June 2011
Author:happydog
Status:ok
Tags:
Comment:
[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) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/svnImport.php
@@ -56,6 +56,7 @@
5757 */
5858 private function importRepo( $repoName, $start = null, $cacheSize = 0 ) {
5959 global $wgCodeReviewImportBatchSize;
 60+ static $adaptorReported = false;
6061
6162 $repo = CodeRepository::newFromName( $repoName );
6263
@@ -65,7 +66,12 @@
6667 }
6768
6869 $svn = SubversionAdaptor::newFromRepo( $repo->getPath() );
69 - $this->output( "Using " . get_class($svn). " adaptor\n" );
 70+ if ( !$adaptorReported ) {
 71+ $this->output( "Using " . get_class($svn). " adaptor\n" );
 72+ $adaptorReported = true;
 73+ }
 74+
 75+ $this->output( "IMPORT FROM REPO: $repoName\n" );
7076 $lastStoredRev = $repo->getLastStoredRev();
7177 $this->output( "Last stored revision: $lastStoredRev\n" );
7278
@@ -85,7 +91,7 @@
8692 return;
8793 }
8894
89 - $this->output( "Syncing repo $repoName from r$start to HEAD...\n" );
 95+ $this->output( "Syncing from r$start to HEAD...\n" );
9096
9197 if ( !$svn->canConnect() ) {
9298 $this->error( "Unable to connect to repository." );

Status & tagging log