HomePhabricator

CodeReview: Changed the 'precache' argument to svnImport.php so that precaching…

Authored by HappyDog.

Description

CodeReview: Changed the 'precache' argument to svnImport.php so that precaching all diffs is now specified by using 'all' instead of -1, as per Tim Starling's suggestion for r62509 (http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62509#c5935): "It's a weakly typed language, you don't need hacks like this. Get rid of this "-1 means all" rubbish and just use the string "all"."

I also made the following changes, relating to the above:

  • Updated the description of the parameter to match the above (and the error message if param is invalid).
  • Removed the new-line/indentation from the 'start' parameter - this should be handled in the output function, not here (I have a patch which I'll post soon).
  • $cacheSize defaults to 0, rather than null (though they have the same meaning). The previous version didn't quite work correctly (in terms of reporting) if 0 was explicitly given on the command-line.
  • I moved the setup of $dbw and $options to the top of the if block so that we can add the LIMIT parameter within the if/else structure used for status output, rather than requiring a separate check.

Details

Committed
HappyDogFeb 25 2010, 11:44 AM
Parents
rECREe888c3c250d0: CodeReview: Changed NULL to null, as per NikeRabbit's comment for r62934 (http…
Branches
Unknown
Tags
Unknown
ChangeId
None