Commit 75e9ea11 authored by Pierre-Yves David's avatar Pierre-Yves David
Browse files

evolve: use `merge.graft` instead of `rebasenode`

The core mechanism is properly factorised and have a more stable API.
This is also a good step toward removing the dependency between evolve and the
rebase extension.

This also avoid a breakage with the future 3.3 where some of the rebase API
changed.

--HG--
branch : stable
parent 15492cea54e9
......@@ -806,9 +806,10 @@ def relocate(repo, orig, dest, keepbranch=False):
tr = repo.transaction('relocate')
try:
try:
r = rebase.rebasenode(repo, orig.node(), dest.node(),
{node.nullrev: node.nullrev}, False,
orig.p1().node())
if repo['.'].rev() != dest.rev():
merge.update(repo, dest, False, True, False)
r = merge.graft(repo, orig, orig.p1(),
['local', 'graft'])
if r[-1]: #some conflict
raise util.Abort(
'unresolved merge conflicts (see hg help resolve)')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment