convertrepo: make it work with refactored convert extension
authorPatrick Mezard <pmezard@gmail.com>
Sun, 23 Mar 2008 21:41:03 +0100
changeset 6365 1d3eb332f3cb
parent 6364 b22b39059722
child 6366 07c3cd695b48
convertrepo: make it work with refactored convert extension
contrib/convert-repo
--- a/contrib/convert-repo	Sun Mar 23 21:40:27 2008 +0100
+++ b/contrib/convert-repo	Sun Mar 23 21:41:03 2008 +0100
@@ -17,9 +17,11 @@
 opts = {}
 args = []
 try:
-    args = fancyopts.fancyopts(sys.argv[1:], options, opts)
-except fancyopts.getopt.GetoptError, inst:
-    u.warn('Usage:\n%s' % help)
+    args = list(fancyopts.fancyopts(sys.argv[1:], options, opts))
+    args += [None]*(3 - len(args))
+    src, dest, revmapfile = args
+except (fancyopts.getopt.GetoptError, ValueError), inst:
+    u.warn('Usage:\n%s\n' % help)
     sys.exit(-1)
 
-convert._convert(u, *args, **opts)
+convert.convert(u, src, dest, revmapfile, **opts)