# HG changeset patch # User Martin von Zweigbergk # Date 1601095650 25200 # Node ID 0cb1718ed95c0e835a842c11de06eb43ee522bd0 # Parent 8e0bf4869cad02feebb80d0becbaab1de1cae0f4 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. diff -r 8e0bf4869cad -r 0cb1718ed95c hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Fri Sep 25 15:28:17 2020 -0700 +++ b/hgext3rd/evolve/evolvecmd.py Fri Sep 25 21:47:30 2020 -0700 @@ -929,14 +929,14 @@ 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: