From: Edward Z. Yang Date: Mon, 12 Oct 2009 02:52:52 +0000 (-0400) Subject: Major updates to resolution code from runs. X-Git-Url: https://scripts.mit.edu/gitweb/wizard.git/commitdiff_plain/48af129368493c5458c942aef025ed746b97b856 Major updates to resolution code from runs. * Augment MediaWiki conflict resolution with correct version for end of line * Add prepareMerge to application for pre-merge resolution helpers (mostly for line-ending problems) * Fix MediaWiki resolveConflicts parsing of ls-files output, and another unrelated bug * Add space between logging and summary outputs * Move backup back to correct location, and perform size calculation twice * UpgradeVerificationFailure gets useful output * /dev/shm/wizard gets chmod'ed 0777 * Fix resolution algorithm to handle each conflict block individually. Test cases augmented accordingly. Signed-off-by: Edward Z. Yang --- diff --git a/wizard/app/mediawiki.py b/wizard/app/mediawiki.py index e356c8f..ceae53a 100644 --- a/wizard/app/mediawiki.py +++ b/wizard/app/mediawiki.py @@ -27,10 +27,79 @@ seed = { } resolutions = { -#'LocalSettings.php': [ -# (""" -#""", []) -# ] +'LocalSettings.php': [ + (""" +<<<<<<< +***1*** +======= +## The URL base path to the directory containing the wiki; +## defaults for all runtime URL paths are based off of this. +## For more information on customizing the URLs please see: +## http://www.mediawiki.org/wiki/Manual:Short_URL +***2*** +$wgScriptExtension = ".php"; + +## UPO means: this is also a user preference option +>>>>>>> +""", [-1]), + (""" +<<<<<<< +***1*** +======= + +# MySQL specific settings +$wgDBprefix = ""; +>>>>>>> +""", ["\n# MySQL specific settings", 1]), + (""" +<<<<<<< +## is writable, then uncomment this: +***1*** +======= +## is writable, then set this to true: +$wgEnableUploads = false; +>>>>>>> +""", [-1]), + (""" +<<<<<<< +***1*** +$wgMathPath = "{$wgUploadPath}/math"; +$wgMathDirectory = "{$wgUploadDirectory}/math"; +$wgTmpDirectory = "{$wgUploadDirectory}/tmp"; +======= +$wgUseTeX = false; +>>>>>>> +""", [1]), + # order of these rules is important + (""" +<<<<<<< +?> +======= +# When you make changes to this configuration file, this will make +# sure that cached pages are cleared. +$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) ); +>>>>>>> +""", [0]), + (""" +<<<<<<< +***1*** +?> +======= +# When you make changes to this configuration file, this will make +# sure that cached pages are cleared. +$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) ); +>>>>>>> +""", [1, 0]), + (""" +<<<<<<< +***1*** +======= +# When you make changes to this configuration file, this will make +# sure that cached pages are cleared. +$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) ); +>>>>>>> +""", [1, 0]), + ] } class Application(deploy.Application): @@ -66,18 +135,29 @@ class Application(deploy.Application): if type(out) is list: out.append(page) return page.find("