Mercurial > evolve
changeset 5597:0cb1718ed95c
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.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 25 Sep 2020 21:47:30 -0700 |
parents | 8e0bf4869cad |
children | ba8bc1b0acd2 |
files | hgext3rd/evolve/evolvecmd.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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: