Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/merge.py @ 39823:24e493ec2229
py3: rename pycompat.getcwd() to encoding.getcwd() (API)
We need to avoid os.getcwdb() on Windows to avoid DeprecationWarnings, and we
need encoding.strtolocal() to encode the result of os.getcwd().
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 21 Sep 2018 19:48:23 -0400 |
parents | 3dd34b401bc2 |
children | 54c3b4bd01f2 |
comparison
equal
deleted
inserted
replaced
39822:94c25f694ec3 | 39823:24e493ec2229 |
---|---|
25 from .thirdparty import ( | 25 from .thirdparty import ( |
26 attr, | 26 attr, |
27 ) | 27 ) |
28 from . import ( | 28 from . import ( |
29 copies, | 29 copies, |
30 encoding, | |
30 error, | 31 error, |
31 filemerge, | 32 filemerge, |
32 match as matchmod, | 33 match as matchmod, |
33 obsutil, | 34 obsutil, |
34 pycompat, | 35 pycompat, |
1434 | 1435 |
1435 return prunedactions, diverge, renamedelete | 1436 return prunedactions, diverge, renamedelete |
1436 | 1437 |
1437 def _getcwd(): | 1438 def _getcwd(): |
1438 try: | 1439 try: |
1439 return pycompat.getcwd() | 1440 return encoding.getcwd() |
1440 except OSError as err: | 1441 except OSError as err: |
1441 if err.errno == errno.ENOENT: | 1442 if err.errno == errno.ENOENT: |
1442 return None | 1443 return None |
1443 raise | 1444 raise |
1444 | 1445 |