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
rebase: use revnums (not nodes) for set of extinct revisions
There is no need to convert extinct revisions to nodeids.
Differential Revision: https://phab.mercurial-scm.org/D3942
rebase: avoid converting from nodes to revnums twice
In the case where the node has successors, but none of them is an
ancestor of the destination, we would iterate over the successor nodes
twice, check if they're in the repo and convert them to revnums. I
doubt it's a measureable cost, but it gets simpler this way too.
Differential Revision: https://phab.mercurial-scm.org/D3941