|
@@ -74,6 +74,10 @@ class Command(object):
|
|
|
|
|
|
return ret if ret is not None else EX_OK
|
|
|
|
|
|
+ def show_help(self, command):
|
|
|
+ self.run_from_argv(self.prog_name, [command, "--help"])
|
|
|
+ return EX_USAGE
|
|
|
+
|
|
|
def error(self, s):
|
|
|
self.out(s, fh=sys.stderr)
|
|
|
|
|
@@ -334,6 +338,17 @@ class status(Command):
|
|
|
status = command(status)
|
|
|
|
|
|
|
|
|
+class migrate(Command):
|
|
|
+
|
|
|
+ def usage(self, command):
|
|
|
+ return "%%prog %s <source_url> <dest_url>" % (command, )
|
|
|
+
|
|
|
+ def run(self, *args, **kwargs):
|
|
|
+ if len(args) < 2:
|
|
|
+ return self.show_help("migrate")
|
|
|
+migrate = command(migrate)
|
|
|
+
|
|
|
+
|
|
|
class help(Command):
|
|
|
|
|
|
def usage(self, command):
|