convert: Accept local path on win32.
authorShun-ichi GOTO <shunichi.goto@gmail.com>
Thu, 03 Jan 2008 06:25:30 +0900
changeset 5793 68f5bf9aa582
parent 5791 d09ccdbf7286
child 5794 4c16020d1172
convert: Accept local path on win32.
hgext/convert/subversion.py
--- a/hgext/convert/subversion.py	Thu Jan 03 13:46:39 2008 -0600
+++ b/hgext/convert/subversion.py	Thu Jan 03 06:25:30 2008 +0900
@@ -51,7 +51,10 @@
     except SubversionException:
         pass
     if os.path.isdir(path):
-        return 'file://%s' % os.path.normpath(os.path.abspath(path))
+        path = os.path.normpath(os.path.abspath(path))
+        if os.name == 'nt':
+            path = '/' + path.replace('\\', '/')
+        return 'file://%s' % path
     return path
 
 def optrev(number):