]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/command/upgrade.py
Implement MediaWiki scaffolding for auto conflict resolution; untested.
[wizard.git] / wizard / command / upgrade.py
index 041cd80a275d4e1df5b458db2177ba7f2e503ca6..da15d56c6e948b3dd88a5b5f408d8c398f5cd825 100644 (file)
@@ -204,7 +204,13 @@ def perform_merge(sh, repo, d, version, use_shm):
     try:
         sh.call("git", "merge", next_virtual_commit)
     except shell.CallError:
+        # Run the application's specific merge resolution algorithms
+        # and see if we can salvage it
         curdir = os.getcwd()
+        if d.application.resolveConflicts(curdir):
+            logging.info("Resolved conflicts with application specific knowledge")
+            sh.call("git", "commit", "-a", "-m", "merge")
+            return
         logging.info("Conflict info:\n", sh.eval("git", "diff"))
         if use_shm:
             # Keeping all of our autoinstalls in shared memory is