+class NotMigratedError(Error):
+ """
+ The deployment contains a .scripts-version file, but no .git
+ or .scripts directory.
+ """
+ #: Directory of deployment
+ dir = None
+ def __init__(self, dir):
+ self.dir = dir
+ def __str__(self):
+ return """This installation was not migrated"""
+
+class AlreadyVersionedError(Error):
+ """The deployment contained a .git directory but no .scripts directory."""
+ #: Directory of deployment
+ dir = None
+ def __init__(self, dir):
+ self.dir = dir
+ def __str__(self):
+ return """
+
+ERROR: Directory contains a .git directory, but not
+a .scripts directory. If this is not a corrupt
+migration, this means that the user was versioning their
+install using Git."""
+
+class NotConfiguredError(Error):
+ """The install was missing essential configuration."""
+ #: Directory of unconfigured install
+ dir = None
+ def __init__(self, dir):
+ self.dir = dir
+ def __str__(self):
+ return """
+
+ERROR: The install was well-formed, but not configured
+(essential configuration files were not found.)"""
+
+class CorruptedAutoinstallError(Error):
+ """The install was missing a .git directory, but had a .scripts directory."""
+ #: Directory of the corrupted install
+ dir = None
+ def __init__(self, dir):
+ self.dir = dir
+ def __str__(self):
+ return """
+
+ERROR: Directory contains a .scripts directory,
+but not a .git directory."""
+
+class NotAutoinstallError(Error):
+ """The directory was not an autoinstall, due to missing .scripts-version file."""
+ #: Directory in question
+ dir = None
+ def __init__(self, dir):
+ self.dir = dir
+ def __str__(self):
+ return """
+
+ERROR: Could not find .scripts-version file. Are you sure
+this is an autoinstalled application?
+"""
+
+class NoTagError(Error):
+ """Deployment has a tag that does not have an equivalent in upstream repository."""
+ #: Missing tag
+ tag = None
+ def __init__(self, tag):
+ self.tag = tag
+ def __str__(self):
+ return """
+
+ERROR: Could not find tag %s in repository.""" % self.tag
+
+class NoLocalTagError(Error):
+ """Could not find tag in local repository."""
+ #: Missing tag
+ tag = None
+ def __init__(self, tag):
+ self.tag = tag
+ def __str__(self):
+ return """
+
+ERROR: Could not find tag %s in local repository.""" % self.tag
+
+class InconsistentPristineTagError(Error):
+ """Pristine tag commit ID does not match upstream pristine tag commit ID."""
+ #: Inconsistent tag
+ tag = None
+ def __init__(self, tag):
+ self.tag = tag
+ def __str__(self):
+ return """
+
+ERROR: Local pristine tag %s did not match repository's. This
+probably means an upstream rebase occured.""" % self.tag
+
+class InconsistentScriptsTagError(Error):
+ """Scripts tag commit ID does not match upstream scripts tag commit ID."""
+ #: Inconsistent tag
+ tag = None
+ def __init__(self, tag):
+ self.tag = tag
+ def __str__(self):
+ return """
+
+ERROR: Local scripts tag %s did not match repository's. This
+probably means an upstream rebase occurred.""" % self.tag
+
+class HeadNotDescendantError(Error):
+ """HEAD is not connected to tag."""
+ #: Tag that HEAD should have been descendant of.
+ tag = None
+ def __init__(self, tag):
+ self.tag = tag
+ def __str__(self):
+ return """
+
+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
+
+class VersionDetectionError(Error):
+ """Could not detect real version of application."""
+ def __str__(self):
+ return """
+
+ERROR: Could not detect the real version of the application."""
+
+class VersionMismatchError(Error):
+ """Git version of application does not match detected version."""
+ #: Detected version
+ real_version = None
+ #: Version from Git
+ git_version = None
+ def __init__(self, real_version, git_version):
+ self.real_version = real_version
+ self.git_version = git_version
+ def __str__(self):
+ return """
+
+ERROR: The detected version %s did not match the Git
+version %s.""" % (self.real_version, self.git_version)
+
+class WebVerificationError(Error):
+ """Could not access the application on the web"""
+ #: Contents of web page access
+ contents = None
+ def __init__(self, contents):
+ self.contents = contents
+ def __str__(self):
+ return """
+
+ERROR: We were not able to access the application on the
+web. This may indicate that the website is behind
+authentication on the htaccess level. The contents
+of the page were:
+
+%s""" % self.contents
+
+class UnknownWebPath(Error):
+ """Could not determine application's web path."""
+ def __str__(self):
+ return """
+
+ERROR: We were not able to determine what the application's
+host and path were in order to perform a web request
+on the application. You can specify this manually using
+the WIZARD_WEB_HOST and WIZARD_WEB_PATH environment
+variables."""