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