+class PermissionsError(UserException):
+ def __init__(self, dir):
+ self.dir = dir
+ def __str__(self):
+ return """
+
+ERROR: You don't have permissions to access this directory.
+Do you have tickets for AFS with your root instance, and
+is your root instance on scripts-security-upd?
+
+You can check by running the commands 'klist' and
+'blanche scripts-security-upd'. We recommend getting
+root tickets using Nelson Elhage's krbroot script
+at /mit/nelhage/Public/krbroot (for which you run
+'krbroot shell' and then 'aklog').
+"""
+
+class NoSuchDirectoryError(UserException):
+ def __init__(self, dir):
+ self.dir = dir
+ def __str__(self):
+ return """
+
+ERROR: No such directory... check your typing
+"""
+
+class AlreadyMigratedError(UserException):
+ def __init__(self, dir):
+ self.dir = dir
+ def __str__(self):
+ return """
+
+ERROR: Directory already contains a .git directory.
+Did you already migrate it?
+"""
+
+class NotAutoinstallError(UserException):
+ 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 NoRepositoryError(UserException):
+ def __init__(self, app):
+ self.app = app
+ def __str__(self):
+ return """
+
+ERROR: Could not find repository for this application. Have
+you converted the repository over? Is the name %s
+the same as the name of the .git folder?
+""" % self.app
+
+class NoTagError(UserException):
+ def __init__(self, version):
+ self.version = version
+ def __str__(self):
+ return """
+
+ERROR: Could not find tag v%s-scripts in repository
+for %s. Double check and make sure
+the repository was prepared with all necessary tags!
+""" % (self.version.version, self.version.application.name)
+
+def migrate(argv, global_options, logger = None):