# HG changeset patch # User Martin von Zweigbergk # Date 1598420073 25200 # Node ID 628215631e8e0a4d1afa4e30b48d1dea19d7aafe # Parent 65622482cc9dac98a7207c4dbce4c18d8750230e metaedit: switch to cleanupnodes() so e.g. bookmarks are moved diff -r 65622482cc9d -r 628215631e8e CHANGELOG --- a/CHANGELOG Tue Aug 25 22:50:28 2020 -0700 +++ b/CHANGELOG Tue Aug 25 22:34:33 2020 -0700 @@ -5,6 +5,7 @@ -------------------- * numerous minor changes to packaging, README moved to README.rst + * metaedit: update bookmark location when applicable topic (0.20.0) diff -r 65622482cc9d -r 628215631e8e hgext3rd/evolve/cmdrewrite.py --- a/hgext3rd/evolve/cmdrewrite.py Tue Aug 25 22:50:28 2020 -0700 +++ b/hgext3rd/evolve/cmdrewrite.py Tue Aug 25 22:34:33 2020 -0700 @@ -935,14 +935,16 @@ 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() diff -r 65622482cc9d -r 628215631e8e tests/test-metaedit.t --- a/tests/test-metaedit.t Tue Aug 25 22:50:28 2020 -0700 +++ b/tests/test-metaedit.t Tue Aug 25 22:34:33 2020 -0700 @@ -265,12 +265,8 @@ 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)