Commit c883a338 authored by Martin von Zweigbergk's avatar Martin von Zweigbergk
Browse files

evolvecmd: move bookmark-deactivation out of _relocatecommit()

The bookmark-deactivation code will be done whether or not we're using
in-memory merge in `_relocatecommit()`. It could be put in a new
`_preparerelocate()` or something, but it's short enough that it
doesn't seem worth it.
parent 8e0bf4869cad
Pipeline #11603 passed with stage
in 5 minutes and 19 seconds
......@@ -929,14 +929,14 @@ def _relocate(repo, orig, dest, evolvestate, pctx=None, keepbranch=False,
tr = repo.currenttransaction()
assert tr is not None
if repo._activebookmark:
repo.ui.status(_(b"(leaving bookmark %s)\n") % repo._activebookmark)
bookmarksmod.deactivate(repo)
nodenew = _relocatecommit(repo, orig, dest, pctx, keepbranch, commitmsg)
_finalizerelocate(repo, orig, dest, nodenew, tr, category, evolvestate)
return nodenew
def _relocatecommit(repo, orig, dest, pctx, keepbranch, commitmsg):
if repo._activebookmark:
repo.ui.status(_(b"(leaving bookmark %s)\n") % repo._activebookmark)
bookmarksmod.deactivate(repo)
if repo[b'.'].rev() != dest.rev():
compat._update(repo, dest, branchmerge=False, force=True)
if keepbranch:
......
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