mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
phase: properly compute ancestors of --rev on push (issue3786)
Now that discovery is working on unfiltered changeset, I had a good occasion to look at that bug again. This let me realise that a trivial node vs rev comparision was the cause of this two years old bugs… Happy second birthday phases!
This commit is contained in:
parent
dd6f92d843
commit
4a16e8a21b
@ -1899,7 +1899,8 @@ class localrepository(object):
|
||||
# We can pick:
|
||||
# * missingheads part of common (::commonheads)
|
||||
common = set(outgoing.common)
|
||||
cheads = [node for node in revs if node in common]
|
||||
nm = self.changelog.nodemap
|
||||
cheads = [node for node in revs if nm[node] in common]
|
||||
# and
|
||||
# * commonheads parents on missing
|
||||
revset = unfi.set('%ln and parents(roots(%ln))',
|
||||
|
@ -92,6 +92,20 @@ push from alpha to beta should update phase even if nothing is transferred
|
||||
|
|
||||
o 0 public a-A - 054250a37db4
|
||||
|
||||
$ hg push -r 2 ../beta
|
||||
pushing to ../beta
|
||||
searching for changes
|
||||
no changes found
|
||||
[1]
|
||||
$ hgph
|
||||
@ 3 draft a-D - b555f63b6063
|
||||
|
|
||||
o 2 public a-C - 54acac6f23ab
|
||||
|
|
||||
o 1 public a-B - 548a3d25dbf0
|
||||
|
|
||||
o 0 public a-A - 054250a37db4
|
||||
|
||||
$ hg push ../beta
|
||||
pushing to ../beta
|
||||
searching for changes
|
||||
|
Loading…
Reference in New Issue
Block a user