]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/command/migrate.py
Use diff3 conflict style, which gives more information.
[wizard.git] / wizard / command / migrate.py
index 168b67afe3d1c5a40d42712ecead02ef9a605f84..7af52a8e6c1251f4bcb70db5b604791623736e64 100644 (file)
@@ -6,7 +6,10 @@ from wizard import command, deploy, shell, util
 
 def main(argv, baton):
     options, args = parse_args(argv, baton)
-    dir = args[0]
+    if args:
+        dir = args[0]
+    else:
+        dir = os.getcwd()
 
     shell.drop_priviledges(dir, options.log_file)
 
@@ -79,8 +82,6 @@ NOT run this command as root."""
     options, args = parser.parse_all(argv)
     if len(args) > 1:
         parser.error("too many arguments")
-    elif not args:
-        parser.error("must specify directory")
     return (options, args)
 
 def perform_force(options):
@@ -147,13 +148,15 @@ class Error(command.Error):
     pass
 
 class AlreadyMigratedError(Error):
+    quiet = True
     def __init__(self, dir):
         self.dir = dir
     def __str__(self):
         return """
 
-ERROR: Directory already contains a .git and
-.scripts directory.  If you force this migration,
-both of these directories will be removed.
+This autoinstall is already migrated; move along, nothing to
+see here.  (If you really want to, you can force a re-migration
+with --force, but this will blow away the existing .git and
+.scripts directories (i.e. your history and Wizard configuration).)
 """