contrib/convert-repo
author Patrick Mezard <pmezard@gmail.com>
Fri, 14 Sep 2007 22:17:53 +0200
changeset 5304 b85f7cc133cc
parent 4514 ec889780f28b
permissions -rwxr-xr-x
convert: avoid interpreting Windows path as CVS connection strings. CVS connection strings regexp detect colons to separate protocols from path and login. Unfortunately, Windows paths contains colons and were interpreted as rsh connection strings.

#!/usr/bin/env python
#
# Wrapper script around the convert.py hgext extension
# for foreign SCM conversion to mercurial format.
#

import sys
from mercurial import ui, fancyopts
from hgext import convert

# Options extracted from the cmdtable
func, options, help = convert.cmdtable['convert']

# An ui instance
u = ui.ui()

opts = {}
args = []
try:
    args = fancyopts.fancyopts(sys.argv[1:], options, opts)
except fancyopts.getopt.GetoptError, inst:
    u.warn('Usage:\n%s' % help)
    sys.exit(-1)

convert._convert(u, *args, **opts)