Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revset.py @ 38797:823f34acfd46 stable
revset: make heads(commonancestors(x + x^)) be x^, not x
Differential Revision: https://phab.mercurial-scm.org/D4742
author | Valentin Gatien-Baron <vgatien-baron@janestreet.com> |
---|---|
date | Tue, 25 Sep 2018 16:32:38 -0400 |
parents | 0561e69ed9f1 |
children | 85a474adaf26 |
comparison
equal
deleted
inserted
replaced
38796:84c61c1593c4 | 38797:823f34acfd46 |
---|---|
612 @predicate('_commonancestorheads(set)', safe=True) | 612 @predicate('_commonancestorheads(set)', safe=True) |
613 def _commonancestorheads(repo, subset, x): | 613 def _commonancestorheads(repo, subset, x): |
614 # This is an internal method is for quickly calculating "heads(::x and | 614 # This is an internal method is for quickly calculating "heads(::x and |
615 # ::y)" | 615 # ::y)" |
616 | 616 |
617 # These greatest common ancestors are the same ones that the consesus bid | 617 # These greatest common ancestors are the same ones that the consensus bid |
618 # merge will find. | 618 # merge will find. |
619 h = heads(repo, fullreposet(repo), x, anyorder) | 619 startrevs = getset(repo, fullreposet(repo), x, order=anyorder) |
620 | 620 |
621 ancs = repo.changelog._commonancestorsheads(*list(h)) | 621 ancs = repo.changelog._commonancestorsheads(*list(startrevs)) |
622 return subset & baseset(ancs) | 622 return subset & baseset(ancs) |
623 | 623 |
624 @predicate('commonancestors(set)', safe=True) | 624 @predicate('commonancestors(set)', safe=True) |
625 def commonancestors(repo, subset, x): | 625 def commonancestors(repo, subset, x): |
626 """Changesets that are ancestors of every changeset in set. | 626 """Changesets that are ancestors of every changeset in set. |