Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/obsutil.py @ 41152:191fac9ff9d3
obsutil: fix the issue5686
While traversing the obsolescence graph to find the successors sets
of csets:
In its 4th case (read comments of obsutil.successorssets to see
all 4 cases) where we know successors sets of all direct successors
of CURRENT, we were just missing a condition to filter out the case
when a cset is pruned.
And without this condition (that this patch added) it was making a whole
successor set to [] just because of one pruned marker.
For e.g:if following is the successors set of a cset A:
A -> [a, b, c]
if we prune c, we expect A's successors set to be [a, b] but
you would get:
A -> []
So this patch make sure that we calculate the right successorsset of csets
considering the pruned cset (in split case).
Differential Revision: https://phab.mercurial-scm.org/D5474
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Sun, 23 Dec 2018 02:01:35 +0530 |
parents | 520514af2d93 |
children | 9de6c4f61608 |
comparison
equal
deleted
inserted
replaced
41151:7b7e081f8954 | 41152:191fac9ff9d3 |
---|---|
709 # do not duplicated entry in successors set | 709 # do not duplicated entry in successors set |
710 # first entry wins. | 710 # first entry wins. |
711 if part not in newss: | 711 if part not in newss: |
712 newss.append(part) | 712 newss.append(part) |
713 productresult.append(newss) | 713 productresult.append(newss) |
714 markss = productresult | 714 if productresult: |
715 markss = productresult | |
715 succssets.extend(markss) | 716 succssets.extend(markss) |
716 # remove duplicated and subset | 717 # remove duplicated and subset |
717 seen = [] | 718 seen = [] |
718 final = [] | 719 final = [] |
719 candidates = sorted((s for s in succssets if s), | 720 candidates = sorted((s for s in succssets if s), |