Mercurial > hg
comparison mercurial/dirstate.py @ 43523:c21aca51b392
utils: move the `dirs` definition in pathutil (API)
Before this change, the `dirs` class was accessible through the `mercurial.util`
module. That module is expected to stay free of scm specific content.
The `pathutil` destination has been selection by Martin von Zweigbergk.
This work is part of a refactoring to unify the revlog index and the nodemap.
This unification prepare the use of a persistent nodemap.
Differential Revision: https://phab.mercurial-scm.org/D7311
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 06 Nov 2019 14:13:19 +0100 |
parents | 9f70512ae2cf |
children | dc9c570a3818 |
comparison
equal
deleted
inserted
replaced
43522:ce96be208ea4 | 43523:c21aca51b392 |
---|---|
1512 """ | 1512 """ |
1513 return d in self._alldirs | 1513 return d in self._alldirs |
1514 | 1514 |
1515 @propertycache | 1515 @propertycache |
1516 def _dirs(self): | 1516 def _dirs(self): |
1517 return util.dirs(self._map, b'r') | 1517 return pathutil.dirs(self._map, b'r') |
1518 | 1518 |
1519 @propertycache | 1519 @propertycache |
1520 def _alldirs(self): | 1520 def _alldirs(self): |
1521 return util.dirs(self._map) | 1521 return pathutil.dirs(self._map) |
1522 | 1522 |
1523 def _opendirstatefile(self): | 1523 def _opendirstatefile(self): |
1524 fp, mode = txnutil.trypending(self._root, self._opener, self._filename) | 1524 fp, mode = txnutil.trypending(self._root, self._opener, self._filename) |
1525 if self._pendingmode is not None and self._pendingmode != mode: | 1525 if self._pendingmode is not None and self._pendingmode != mode: |
1526 fp.close() | 1526 fp.close() |