phases: remove excessive optimization from newheads() (
issue5939)
This function is intended to compute 'heads(::heads - roots::)', but it
failed because 'heads + parents(roots)' missed sibling branches of the roots.
That's why the public heads slipped down from D to B in the example added by
2a227782e754 "tests: add test demonstrating phase loss when cloning":
> E draft
> |\Z draft
> | Y draft
> D | public
> | X draft
> C/ public
> B public
> A public
where heads = {E, Z},
roots = {X}
rebase: remove unused variable "release" and an extra blank line
Differential Revision: https://phab.mercurial-scm.org/D3947
rebase: remove unnecessary confirm block
Removed unnecessary 'if confirm:' block as that thing is now
handled at 'finally'.
Differential Revision: https://phab.mercurial-scm.org/D3945
rebase: in --confirm option just abort if hit a conflict
Before this patch, it was prompting the user in both cases 1) when
there is no conflict 2) when there is at least one conflict. But
for simplicity we can just abort if we hit a conflict and no need to
prompt in that case.
Differential Revision: https://phab.mercurial-scm.org/D3944
pullbundle: fix handling of gzip bundlespecs
Differential Revision: https://phab.mercurial-scm.org/D3933
tests: add test demonstrating phase loss when cloning (
issue5939)
The added tests demonstrate that phases exchange when using the
listkeys based phases exchange fails to preserve public phase in
a certain scenario when a merge is a phase root. Both non-bundle2
and bundle2 prior to the binary phase data part are buggy.
Differential Revision: https://phab.mercurial-scm.org/D3932
scmutil: rewrite docstring for filecache
The old docstring was incorrect in that it said that subsequent
calls perform a stat() and refresh the object if things change.
This is not how things work: __get__ populates obj.__dict__[self.sname]
with the result of the decorated function and returns this value
without validation on subsequent calls, if available.
The correct usage of this type is kinda wonky. It would probably
benefit from a refactor. But I don't have time to do that right
now. But we can change the docstring so others aren't entrapped by
its lies (like I was when using repofilecache in a Mozilla extension).
Differential Revision: https://phab.mercurial-scm.org/D3943
rebase: correct misleading message in --confirm option
Differential Revision: https://phab.mercurial-scm.org/D3939
rebase: make sure we don't loose the return code in --confirm option
return _dorebase() to make sure it returns 'return code'.
Differential Revision: https://phab.mercurial-scm.org/D3938