##// END OF EJS Templates
convertrepo: make it work with refactored convert extension
Patrick Mezard -
r6365:1d3eb332 default
parent child Browse files
Show More
@@ -1,25 +1,27 b''
1 1 #!/usr/bin/env python
2 2 #
3 3 # Wrapper script around the convert.py hgext extension
4 4 # for foreign SCM conversion to mercurial format.
5 5 #
6 6
7 7 import sys
8 8 from mercurial import ui, fancyopts
9 9 from hgext import convert
10 10
11 11 # Options extracted from the cmdtable
12 12 func, options, help = convert.cmdtable['convert']
13 13
14 14 # An ui instance
15 15 u = ui.ui()
16 16
17 17 opts = {}
18 18 args = []
19 19 try:
20 args = fancyopts.fancyopts(sys.argv[1:], options, opts)
21 except fancyopts.getopt.GetoptError, inst:
22 u.warn('Usage:\n%s' % help)
20 args = list(fancyopts.fancyopts(sys.argv[1:], options, opts))
21 args += [None]*(3 - len(args))
22 src, dest, revmapfile = args
23 except (fancyopts.getopt.GetoptError, ValueError), inst:
24 u.warn('Usage:\n%s\n' % help)
23 25 sys.exit(-1)
24 26
25 convert._convert(u, *args, **opts)
27 convert.convert(u, src, dest, revmapfile, **opts)
General Comments 0
You need to be logged in to leave comments. Login now