D755: dirstate: move _dirs to dirstatemap
durham (Durham Goode)
phabricator at mercurial-scm.org
Thu Sep 21 00:03:46 UTC 2017
durham created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
As part of moving the dirstate storage logic to a new class, lets move the _dirs
computation onto the class so extensions can replace it with a persisted index
of directories.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D755
AFFECTED FILES
mercurial/dirstate.py
CHANGE DETAILS
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -210,7 +210,7 @@
@propertycache
def _dirs(self):
- return util.dirs(self._map._map, 'r')
+ return self._map.dirs()
def dirs(self):
return self._dirs
@@ -1372,3 +1372,6 @@
f[normcase(name)] = name
f['.'] = '.' # prevents useless util.fspath() invocation
return f
+
+ def dirs(self):
+ return util.dirs(self._map, 'r')
To: durham, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list