]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/command/upgrade.py
Fix bug where php.ini not being rewritten for MediaWiki.
[wizard.git] / wizard / command / upgrade.py
index 87e6199ae6e2ecbcd73cfa1bacf2928f57eba6d7..0850994247275912d37487767d39553ec43a21c9 100644 (file)
@@ -182,7 +182,16 @@ class Upgrade(object):
             self.prod.verify()
             self.prod.verifyDatabase()
             self.prod.verifyTag(options.srv_path)
-            self.prod.verifyGit(options.srv_path)
+            try:
+                self.prod.verifyGit(options.srv_path)
+            except deploy.InconsistentWizardTagError:
+                shell.call("git", "fetch")
+                shell.call("git", "fetch", "--tags")
+                shell.call("wizard", "remaster")
+                self.prod.verifyGit(options.srv_path)
+            except deploy.HeadNotDescendantError:
+                shell.call("wizard", "remaster")
+                self.prod.verifyGit(options.srv_path)
             if not options.skip_verification:
                 self.prod.verifyConfigured()
             try:
@@ -290,7 +299,7 @@ class Upgrade(object):
         self.temp_dir = tempfile.mkdtemp(prefix="wizard", dir=dir)
         self.temp_wc_dir = os.path.join(self.temp_dir, "repo")
         logging.info("Using temporary directory: " + self.temp_wc_dir)
-        shell.call("git", "clone", "-q", "--shared", ".", self.temp_wc_dir)
+        shell.call("git", "clone", "-q", ".", self.temp_wc_dir)
     def mergeSaveState(self):
         """Save variables so that ``--continue`` will work."""
         # yeah yeah no trailing newline whatever