Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dirstate.py @ 47108:e061a1df32a8
dirstate-tree: Abstract "non-normal" and "other parent" sets
Instead of exposing `HashSet`s directly, have slightly higher-level
methods for the operations that Python bindings need on them.
Differential Revision: https://phab.mercurial-scm.org/D10363
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Thu, 08 Apr 2021 14:58:44 +0200 |
parents | d55b71393907 |
children | 473abf4728bf |
line wrap: on
line diff
--- a/mercurial/dirstate.py Tue Mar 30 14:15:23 2021 +0200 +++ b/mercurial/dirstate.py Thu Apr 08 14:58:44 2021 +0200 @@ -340,9 +340,8 @@ oldp2 != self._nodeconstants.nullid and p2 == self._nodeconstants.nullid ): - candidatefiles = self._map.nonnormalset.union( - self._map.otherparentset - ) + candidatefiles = self._map.non_normal_or_other_parent_paths() + for f in candidatefiles: s = self._map.get(f) if s is None: @@ -1725,6 +1724,9 @@ self.nonnormalset = nonnorm return otherparents + def non_normal_or_other_parent_paths(self): + return self.nonnormalset.union(self.otherparentset) + @propertycache def identity(self): self._map @@ -1939,6 +1941,9 @@ otherparents = self._rustmap.other_parent_entries() return otherparents + def non_normal_or_other_parent_paths(self): + return self._rustmap.non_normal_or_other_parent_paths() + @propertycache def dirfoldmap(self): f = {}