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``
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):
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):
"""
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."""
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."""