Mercurial > public > mercurial-scm > hg
diff mercurial/dirstatemap.py @ 48148:e2753a7acfa7
dirstate-item: use the `p2_info` property to replace more verbose call
Differential Revision: https://phab.mercurial-scm.org/D11592
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 01 Oct 2021 04:04:38 +0200 |
parents | 98b3eb6c1479 |
children | e0b4e4f80fff |
line wrap: on
line diff
--- a/mercurial/dirstatemap.py Wed Sep 29 02:06:04 2021 +0200 +++ b/mercurial/dirstatemap.py Fri Oct 01 04:04:38 2021 +0200 @@ -332,7 +332,7 @@ if fold_p2: for f, s in pycompat.iteritems(self._map): # Discard "merged" markers when moving away from a merge state - if s.merged or s.from_p2: + if s.p2_info: source = self.copymap.pop(f, None) if source: copies[f] = source @@ -604,7 +604,7 @@ # enables in-place mutation of elements of a collection while # iterating it, without mutating the collection itself. files_with_p2_info = [ - f for f, s in self._map.items() if s.merged or s.from_p2 + f for f, s in self._map.items() if s.p2_info ] rust_map = self._map for f in files_with_p2_info: