changeset 5304:b85f7cc133cc

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.
author Patrick Mezard <pmezard@gmail.com>
date Fri, 14 Sep 2007 22:17:53 +0200
parents a76c61679b71
children 87348cdce88c
files hgext/convert/cvs.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/cvs.py
+++ b/hgext/convert/cvs.py
@@ -149,7 +149,8 @@ class convert_cvs(converter_source):
             if root.startswith(":ext:"):
                 root = root[5:]
             m = re.match(r'(?:([^@:/]+)@)?([^:/]+):?(.*)', root)
-            if not m:
+            # Do not take Windows path "c:\foo\bar" for a connection strings
+            if os.path.isdir(root) or not m:
                 conntype = "local"
             else:
                 conntype = "rsh"