Mercurial > hg
changeset 39504:05a165dc4f55
snapshot: extract parent chain computation
The final step of this series is to include chain related to "prev" in the
search. Before adding that code we do some simple code movement to clarify the
next diff.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 07 Sep 2018 11:17:37 -0400 |
parents | 5aef5afa8654 |
children | c6b8eab5db19 |
files | mercurial/revlogutils/deltas.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revlogutils/deltas.py Fri Sep 07 11:17:36 2018 -0400 +++ b/mercurial/revlogutils/deltas.py Fri Sep 07 11:17:37 2018 -0400 @@ -711,8 +711,9 @@ # search for snapshot in parents delta chain # map: snapshot-level: snapshot-rev parents_snaps = collections.defaultdict(set) - for p in parents: - for idx, s in enumerate(deltachain(p)): + candidate_chains = [deltachain(p) for p in parents] + for chain in candidate_chains: + for idx, s in enumerate(chain): if not revlog.issnapshot(s): break parents_snaps[idx].add(s)