Commit 3f8b798b authored by Martin von Zweigbergk's avatar Martin von Zweigbergk
Browse files

metaedit: switch to cleanupnodes() so e.g. bookmarks are moved

--HG--
branch : stable
parent f36d6846e1e6
......@@ -5,6 +5,7 @@ Changelog
--------------------
* evolve: specific the source of config override for `server.bundle1=no`
* metaedit: update bookmark location when applicable
10.0.2 -- 2020-09-08
--------------------
......
......@@ -883,14 +883,16 @@ def metaedit(ui, repo, *revs, **opts):
phases.retractboundary(repo, tr, targetphase, [newid])
# Use this condition as a proxy since the commit we care about
# (6335c0de80fa) didn't change any signatures.
if not util.safehasattr(context, 'bin'):
obsolete.createmarkers(repo, [(tuple(allctx), (repo[newid],))],
metadata=metadata, operation=b"metaedit")
# (b99903534e06) didn't change any signatures.
if util.safehasattr(scmutil, 'nullrev'):
mapping = {tuple(ctx.node() for ctx in allctx): (newid,)}
scmutil.cleanupnodes(repo, mapping, operation=b"metaedit",
metadata=metadata)
else:
# hg <= 4.7 (6335c0de80fa)
obsolete.createmarkers(repo, [(ctx, (repo[newid],)) for ctx in allctx],
metadata=metadata, operation=b"metaedit")
# hg <= 4.7 (b99903534e06)
mapping = {ctx.node(): (newid,) for ctx in allctx}
scmutil.cleanupnodes(repo, mapping, operation=b"metaedit",
metadata=metadata)
else:
ui.status(_(b"nothing changed\n"))
tr.close()
......
......@@ -265,12 +265,8 @@ working on merge commits too
A E
A F
$ hg gluf
@ 15: squashed - mr-squasher (C D E F)
@ 15 bookmark-D: squashed - mr-squasher (C D E F)
|
| x 12 bookmark-D: D2 - foobar3 (D)
| |
| x 3: C - test (C)
|/
| o 2: B - test (B)
|/
o 1: A - test (A)
......
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