]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/deploy.py
Fix bug where php.ini not being rewritten for MediaWiki.
[wizard.git] / wizard / deploy.py
index 158ad4033eaf16095e4d1969b0d537bf3234bf13..507fdf314b78eee89b6c1581213eb7b393ee7d49 100644 (file)
@@ -161,6 +161,13 @@ class Deployment(object):
         self._app_version = None
         self._read_cache = {}
         self._old_log = None
+    def setAppVersion(self, app_version):
+        """
+        Manually resets the application version; useful if the working
+        copy is off in space (i.e. not anchored to something we can
+        git describe off of) or there is no metadata to be heard of.
+        """
+        self._app_version = app_version
     def read(self, file, force = False):
         """
         Reads a file's contents, possibly from cache unless ``force``
@@ -236,10 +243,12 @@ class Deployment(object):
             if not compare_tags(self.app_version.pristine_tag):
                 raise InconsistentPristineTagError(self.app_version.pristine_tag)
             if not compare_tags(self.app_version.wizard_tag):
+                # Causes remastering
                 raise InconsistentWizardTagError(self.app_version.wizard_tag)
             parent = repo_rev_parse(self.app_version.wizard_tag)
             merge_base = shell.safeCall("git", "merge-base", parent, "HEAD", strip=True)
             if merge_base != parent:
+                # Causes remastering
                 raise HeadNotDescendantError(self.app_version.wizard_tag)
 
     def verifyConfigured(self):
@@ -507,13 +516,6 @@ class WorkingCopy(Deployment):
     modifications to without fear of interfering with a production
     deployment.  More operations are permitted on these copies.
     """
-    def setAppVersion(self, app_version):
-        """
-        Manually resets the application version; useful if the working
-        copy is off in space (i.e. not anchored to something we can
-        git describe off of.)
-        """
-        self._app_version = app_version
     @chdir_to_location
     def parametrize(self, deployment):
         """
@@ -665,7 +667,8 @@ class InconsistentWizardTagError(Error):
         return """
 
 ERROR: Local wizard tag %s did not match repository's.  This
-probably means an upstream rebase occurred.""" % self.tag
+probably means an upstream rebase occurred.  Try
+'git fetch --tags && wizard remaster'.""" % self.tag
 
 class HeadNotDescendantError(Error):
     """HEAD is not connected to tag."""
@@ -678,7 +681,8 @@ class HeadNotDescendantError(Error):
 
 ERROR: HEAD is not a descendant of %s.  This probably
 means that an upstream rebase occurred, and new tags were
-pulled, but local user commits were never rebased.""" % self.tag
+pulled, but local user commits were never rebased.  Try
+running 'wizard remaster'.""" % self.tag
 
 class VersionDetectionError(Error):
     """Could not detect real version of application."""