diff mercurial/hook.py @ 39818: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 f9b2d996ffa5
children 8c8fcb385c46
line wrap: on
line diff
--- a/mercurial/hook.py	Mon Sep 24 22:46:22 2018 -0400
+++ b/mercurial/hook.py	Fri Sep 21 19:48:23 2018 -0400
@@ -150,7 +150,7 @@
     if repo:
         cwd = repo.root
     else:
-        cwd = pycompat.getcwd()
+        cwd = encoding.getcwd()
     r = ui.system(cmd, environ=env, cwd=cwd, blockedtag='exthook-%s' % (name,))
 
     duration = util.timer() - starttime