Mercurial > public > mercurial-scm > hg
diff mercurial/merge.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 | d6f3877b72c7 |
children | 43a9e02a7b7f |
line wrap: on
line diff
--- a/mercurial/merge.py Wed Aug 17 20:57:15 2016 -0700 +++ b/mercurial/merge.py Wed Nov 23 00:03:11 2016 +0530 @@ -28,6 +28,7 @@ error, filemerge, obsolete, + pycompat, scmutil, subrepo, util, @@ -1040,7 +1041,7 @@ wjoin = repo.wjoin audit = repo.wvfs.audit try: - cwd = os.getcwd() + cwd = pycompat.getcwd() except OSError as err: if err.errno != errno.ENOENT: raise @@ -1066,7 +1067,7 @@ # cwd was present before we started to remove files # let's check if it is present after we removed them try: - os.getcwd() + pycompat.getcwd() except OSError as err: if err.errno != errno.ENOENT: raise