hgext/convert/__init__.py
changeset 4773 169fe1e6104c
parent 4759 95cbb6b74790
child 4811 a5209b0487e0
equal deleted inserted replaced
4771:e321f16f4eac 4773:169fe1e6104c
    16 
    16 
    17 commands.norepo += " convert"
    17 commands.norepo += " convert"
    18 
    18 
    19 converters = [convert_cvs, convert_git, convert_svn, convert_mercurial]
    19 converters = [convert_cvs, convert_git, convert_svn, convert_mercurial]
    20 
    20 
    21 def convertsource(ui, path, rev=None):
    21 def convertsource(ui, path, **opts):
    22     for c in converters:
    22     for c in converters:
    23         if not hasattr(c, 'getcommit'):
    23         if not hasattr(c, 'getcommit'):
    24             continue
    24             continue
    25         try:
    25         try:
    26             return c(ui, path, rev=rev)
    26             return c(ui, path, **opts)
    27         except NoRepo:
    27         except NoRepo:
    28             pass
    28             pass
    29     raise util.Abort('%s: unknown repository type' % path)
    29     raise util.Abort('%s: unknown repository type' % path)
    30 
    30 
    31 def convertsink(ui, path):
    31 def convertsink(ui, path):