diff hgext/convert/subversion.py @ 30640:7a3e67bfa417

py3: replace os.name with pycompat.osname (part 2 of 2)
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 19 Dec 2016 00:28:12 +0530
parents c039eb03e652
children 82f1ef8b4477
line wrap: on
line diff
--- a/hgext/convert/subversion.py	Mon Dec 19 00:16:52 2016 +0530
+++ b/hgext/convert/subversion.py	Mon Dec 19 00:28:12 2016 +0530
@@ -103,7 +103,7 @@
         pass
     if os.path.isdir(path):
         path = os.path.normpath(os.path.abspath(path))
-        if os.name == 'nt':
+        if pycompat.osname == 'nt':
             path = '/' + util.normpath(path)
         # Module URL is later compared with the repository URL returned
         # by svn API, which is UTF-8.
@@ -254,8 +254,8 @@
     try:
         proto, path = url.split('://', 1)
         if proto == 'file':
-            if (os.name == 'nt' and path[:1] == '/' and path[1:2].isalpha()
-                and path[2:6].lower() == '%3a/'):
+            if (pycompat.osname == 'nt' and path[:1] == '/'
+                  and path[1:2].isalpha() and path[2:6].lower() == '%3a/'):
                 path = path[:2] + ':/' + path[6:]
             path = urlreq.url2pathname(path)
     except ValueError: