diff hgext/convert/subversion.py @ 30519:20a42325fdef

py3: use pycompat.getcwd() instead of os.getcwd() We have pycompat.getcwd() which returns bytes path on Python 3. This patch changes most of the occurences of the os.getcwd() with pycompat one.
author Pulkit Goyal <7895pulkit@gmail.com>
date Wed, 23 Nov 2016 00:03:11 +0530
parents 6bed17ba00a1
children c039eb03e652
line wrap: on
line diff
--- a/hgext/convert/subversion.py	Wed Aug 17 20:57:15 2016 -0700
+++ b/hgext/convert/subversion.py	Wed Nov 23 00:03:11 2016 +0530
@@ -12,6 +12,7 @@
 from mercurial import (
     encoding,
     error,
+    pycompat,
     scmutil,
     strutil,
     util,
@@ -1119,7 +1120,7 @@
         self.delexec = []
         self.copies = []
         self.wc = None
-        self.cwd = os.getcwd()
+        self.cwd = pycompat.getcwd()
 
         created = False
         if os.path.isfile(os.path.join(path, '.svn', 'entries')):
@@ -1139,7 +1140,8 @@
                         path = '/' + path
                     path = 'file://' + path
 
-            wcpath = os.path.join(os.getcwd(), os.path.basename(path) + '-wc')
+            wcpath = os.path.join(pycompat.getcwd(), os.path.basename(path) +
+                                '-wc')
             ui.status(_('initializing svn working copy %r\n')
                       % os.path.basename(wcpath))
             self.run0('checkout', path, wcpath)