changeset 5793:68f5bf9aa582

convert: Accept local path on win32.
author Shun-ichi GOTO <shunichi.goto@gmail.com>
date Thu, 03 Jan 2008 06:25:30 +0900
parents d09ccdbf7286
children 4c16020d1172
files hgext/convert/subversion.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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):