mercurial/dirstate.py
changeset 33215 b7f6885cb055
parent 32772 7ad95626f6a7
child 33373 fb320398a21c
--- a/mercurial/dirstate.py	Mon Jul 03 02:52:39 2017 +0900
+++ b/mercurial/dirstate.py	Mon Jul 03 02:52:40 2017 +0900
@@ -83,10 +83,6 @@
         # ntpath.join(root, '') of Python 2.7.9 does not add sep if root is
         # UNC path pointing to root share (issue4557)
         self._rootdir = pathutil.normasprefix(root)
-        # internal config: ui.forcecwd
-        forcecwd = ui.config('ui', 'forcecwd')
-        if forcecwd:
-            self._cwd = forcecwd
         self._dirty = False
         self._dirtypl = False
         self._lastnormaltime = 0
@@ -299,6 +295,10 @@
 
     @propertycache
     def _cwd(self):
+        # internal config: ui.forcecwd
+        forcecwd = self._ui.config('ui', 'forcecwd')
+        if forcecwd:
+            return forcecwd
         return pycompat.getcwd()
 
     def getcwd(self):