# HG changeset patch # User Durham Goode # Date 1506423380 25200 # Node ID af9722412ac3e83f940a50f7f3723ae09de11318 # Parent d8b35920b7b16a913c8af45978fcb21fda19e29c dirstate: move _dirs to dirstatemap 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. Differential Revision: https://phab.mercurial-scm.org/D755 diff -r d8b35920b7b1 -r af9722412ac3 mercurial/dirstate.py --- a/mercurial/dirstate.py Tue Sep 26 03:56:20 2017 -0700 +++ b/mercurial/dirstate.py Tue Sep 26 03:56:20 2017 -0700 @@ -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 @@ -1375,3 +1375,9 @@ f[normcase(name)] = name f['.'] = '.' # prevents useless util.fspath() invocation return f + + def dirs(self): + """Returns a set-like object containing all the directories in the + current dirstate. + """ + return util.dirs(self._map, 'r')