contrib/convert-repo
changeset 4514 ec889780f28b
equal deleted inserted replaced
4513:ac2fe196ac9b 4514:ec889780f28b
       
     1 #!/usr/bin/env python
       
     2 #
       
     3 # Wrapper script around the convert.py hgext extension
       
     4 # for foreign SCM conversion to mercurial format.
       
     5 #
       
     6 
       
     7 import sys
       
     8 from mercurial import ui, fancyopts
       
     9 from hgext import convert
       
    10 
       
    11 # Options extracted from the cmdtable
       
    12 func, options, help = convert.cmdtable['convert']
       
    13 
       
    14 # An ui instance
       
    15 u = ui.ui()
       
    16 
       
    17 opts = {}
       
    18 args = []
       
    19 try:
       
    20     args = fancyopts.fancyopts(sys.argv[1:], options, opts)
       
    21 except fancyopts.getopt.GetoptError, inst:
       
    22     u.warn('Usage:\n%s' % help)
       
    23     sys.exit(-1)
       
    24 
       
    25 convert._convert(u, *args, **opts)