amend: use scmutil.cleanupnodes (BC)
authorJun Wu <quark@fb.com>
Mon, 26 Jun 2017 15:28:28 -0700
changeset 38703 20f533a92eda8f0d6c636535912f52dda9e4df32
parent 38702 8bfd10e4c55aac44d9cab27eb7cb7b7a08036cf6
child 38704 72f051f9a7d83daa2a77d571118ab563f7881fce
push id544
push usergszorc@mozilla.com
push dateSat, 08 Jul 2017 23:29:29 +0000
amend: use scmutil.cleanupnodes (BC) This is marked as BC because the strip backup file name has changed.
mercurial/cmdutil.py
tests/test-automv.t
tests/test-commit-amend.t
tests/test-commit-interactive-curses.t
tests/test-treemanifest.t
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -32,17 +32,16 @@ from . import (
     graphmod,
     match as matchmod,
     obsolete,
     patch,
     pathutil,
     phases,
     pycompat,
     registrar,
-    repair,
     revlog,
     revset,
     scmutil,
     smartset,
     templatekw,
     templater,
     util,
     vfs as vfsmod,
@@ -2744,17 +2743,16 @@ def amend(ui, repo, commitfunc, old, ext
 
     # amend will reuse the existing user if not specified, but the obsolete
     # marker creation requires that the current user's name is specified.
     if obsolete.isenabled(repo, obsolete.createmarkersopt):
         ui.username() # raise exception if username not set
 
     ui.note(_('amending changeset %s\n') % old)
     base = old.p1()
-    createmarkers = obsolete.isenabled(repo, obsolete.createmarkersopt)
 
     newid = None
     with repo.wlock(), repo.lock():
         with repo.transaction('amend') as tr:
             # See if we got a message from -m or -l, if not, open the editor
             # with the message of the changeset to amend
             message = logmessage(ui, opts)
             # ensure logfile does not conflict with later enforcement of the
@@ -2885,42 +2883,20 @@ def amend(ui, repo, commitfunc, old, ext
                     commitphase = old.phase()
                 repo.ui.setconfig('phases', 'new-commit', commitphase, 'amend')
                 newid = repo.commitctx(new)
             finally:
                 repo.ui.setconfig('phases', 'new-commit', ph, 'amend')
             if newid != old.node():
                 # Reroute the working copy parent to the new changeset
                 repo.setparents(newid, nullid)
-
-                # Move bookmarks from old parent to amend commit
-                bms = repo.nodebookmarks(old.node())
-                if bms:
-                    marks = repo._bookmarks
-                    for bm in bms:
-                        ui.debug('moving bookmarks %r from %s to %s\n' %
-                                 (marks, old.hex(), hex(newid)))
-                        marks[bm] = newid
-                    marks.recordchange(tr)
-                #commit the whole amend process
-                if createmarkers:
-                    # mark the new changeset as successor of the rewritten one
-                    new = repo[newid]
-                    obs = [(old, (new,))]
-                    if node:
-                        obs.append((ctx, ()))
-
-                    obsolete.createmarkers(repo, obs, operation='amend')
-        if not createmarkers and newid != old.node():
-            # Strip the intermediate commit (if there was one) and the amended
-            # commit
-            if node:
-                ui.note(_('stripping intermediate changeset %s\n') % ctx)
-            ui.note(_('stripping amended changeset %s\n') % old)
-            repair.strip(ui, repo, old.node(), topic='amend-backup')
+                mapping = {old.node(): (newid,)}
+                if node:
+                    mapping[node] = ()
+                scmutil.cleanupnodes(repo, mapping, 'amend')
     return newid
 
 def commiteditor(repo, ctx, subs, editform=''):
     if ctx.description():
         return ctx.description()
     return commitforceeditor(repo, ctx, subs, editform=editform,
                              unchangedmessagedetection=True)
 
--- a/tests/test-automv.t
+++ b/tests/test-automv.t
@@ -157,17 +157,17 @@ mv/rm/add
   $ mv a.txt b.txt
   $ hg rm a.txt
   $ hg add b.txt
   $ hg status -C
   A b.txt
   R a.txt
   $ hg commit --amend -m 'amended'
   detected move of 1 files
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-amend.hg (glob)
   $ hg status --change . -C
   A b.txt
     a.txt
   A c.txt
   R a.txt
   $ hg up -r 0
   1 files updated, 0 files merged, 2 files removed, 0 files unresolved
 
@@ -180,17 +180,17 @@ mv/rm/add/modif
   $ hg rm a.txt
   $ hg add b.txt
   $ printf '\n' >> b.txt
   $ hg status -C
   A b.txt
   R a.txt
   $ hg commit --amend -m 'amended'
   detected move of 1 files
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-amend.hg (glob)
   $ hg status --change . -C
   A b.txt
     a.txt
   A c.txt
   R a.txt
   $ hg up -r 0
   1 files updated, 0 files merged, 2 files removed, 0 files unresolved
 
@@ -202,17 +202,17 @@ mv/rm/add/modif
   $ mv a.txt b.txt
   $ hg rm a.txt
   $ hg add b.txt
   $ printf '\nfoo\n' >> b.txt
   $ hg status -C
   A b.txt
   R a.txt
   $ hg commit --amend -m 'amended'
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-amend.hg (glob)
   $ hg status --change . -C
   A b.txt
   A c.txt
   R a.txt
   $ hg up -r 0
   1 files updated, 0 files merged, 2 files removed, 0 files unresolved
 
 mv/rm/add/modif/changethreshold
@@ -224,17 +224,17 @@ mv/rm/add/modif/changethreshold
   $ hg rm a.txt
   $ hg add b.txt
   $ printf '\nfoo\n' >> b.txt
   $ hg status -C
   A b.txt
   R a.txt
   $ hg commit --amend --config automv.similarity='60' -m 'amended'
   detected move of 1 files
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-amend.hg (glob)
   $ hg status --change . -C
   A b.txt
     a.txt
   A c.txt
   R a.txt
   $ hg up -r 0
   1 files updated, 0 files merged, 2 files removed, 0 files unresolved
 
@@ -243,17 +243,17 @@ mv
   $ hg add c.txt
   $ hg commit -m 'revision to amend to'
   created new head
   $ mv a.txt b.txt
   $ hg status -C
   ! a.txt
   ? b.txt
   $ hg commit --amend -m 'amended'
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-amend.hg (glob)
   $ hg status -C
   ! a.txt
   ? b.txt
   $ hg up -Cr 0
   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
 
 mv/rm/add/notincommitfiles
   $ echo 'c' > c.txt
@@ -265,26 +265,26 @@ mv/rm/add/notincommitfiles
   $ hg add b.txt
   $ echo 'bar' > d.txt
   $ hg add d.txt
   $ hg status -C
   A b.txt
   A d.txt
   R a.txt
   $ hg commit --amend -m 'amended' d.txt
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-amend.hg (glob)
   $ hg status --change . -C
   A c.txt
   A d.txt
   $ hg status -C
   A b.txt
   R a.txt
   $ hg commit --amend -m 'amended'
   detected move of 1 files
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-amend.hg (glob)
   $ hg status --change . -C
   A b.txt
     a.txt
   A c.txt
   A d.txt
   R a.txt
   $ hg up -r 0
   1 files updated, 0 files merged, 3 files removed, 0 files unresolved
@@ -296,17 +296,17 @@ mv/rm/add/--no-automv
   created new head
   $ mv a.txt b.txt
   $ hg rm a.txt
   $ hg add b.txt
   $ hg status -C
   A b.txt
   R a.txt
   $ hg commit --amend -m 'amended' --no-automv
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-amend.hg (glob)
   $ hg status --change . -C
   A b.txt
   A c.txt
   R a.txt
   $ hg up -r 0
   1 files updated, 0 files merged, 2 files removed, 0 files unresolved
 
 mv/rm/commit/add/amend
@@ -317,17 +317,17 @@ mv/rm/commit/add/amend
   $ mv a.txt b.txt
   $ hg rm a.txt
   $ hg status -C
   R a.txt
   ? b.txt
   $ hg commit -m "removed a"
   $ hg add b.txt
   $ hg commit --amend -m 'amended'
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-amend.hg (glob)
   $ hg status --change . -C
   A b.txt
   R a.txt
 
 error conditions
 
   $ cat >> $HGRCPATH << EOF
   > [automv]
--- a/tests/test-commit-amend.t
+++ b/tests/test-commit-amend.t
@@ -35,17 +35,17 @@ Nothing to amend:
 
 Amending changeset with changes in working dir:
 (and check that --message does not trigger an editor)
 
   $ echo a >> a
   $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -m 'amend base1'
   pretxncommit 43f1ba15f28a50abf0aae529cf8a16bfced7b149
   43f1ba15f28a tip
-  saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d-f1bf3ab8-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d-f1bf3ab8-amend.hg (glob)
   $ echo 'pretxncommit.foo = ' >> $HGRCPATH
   $ hg diff -c .
   diff -r ad120869acf0 -r 43f1ba15f28a a
   --- a/a	Thu Jan 01 00:00:00 1970 +0000
   +++ b/a	Thu Jan 01 00:00:00 1970 +0000
   @@ -1,1 +1,3 @@
    a
   +a
@@ -88,47 +88,46 @@ Check proper abort for empty message
    amend base1
   branch: default
   commit: 1 added, 1 unknown
   update: (current)
   phases: 2 draft
 
 Add new file:
   $ hg ci --amend -m 'amend base1 new file'
-  saved backup bundle to $TESTTMP/.hg/strip-backup/43f1ba15f28a-7a3b3496-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/43f1ba15f28a-7a3b3496-amend.hg (glob)
 
 Remove file that was added in amended commit:
 (and test logfile option)
 (and test that logfile option do not trigger an editor)
 
   $ hg rm b
   $ echo 'amend base1 remove new file' > ../logfile
   $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg ci --amend --logfile ../logfile
-  saved backup bundle to $TESTTMP/.hg/strip-backup/b8e3cb2b3882-0b55739a-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/b8e3cb2b3882-0b55739a-amend.hg (glob)
 
   $ hg cat b
   b: no such file in rev 74609c7f506e
   [1]
 
 No changes, just a different message:
 
   $ hg ci -v --amend -m 'no changes, new message'
   amending changeset 74609c7f506e
   copying changeset 74609c7f506e to ad120869acf0
   committing files:
   a
   committing manifest
   committing changelog
-  stripping amended changeset 74609c7f506e
   1 changesets found
   uncompressed size of bundle content:
        254 (changelog)
        163 (manifests)
        129  a
-  saved backup bundle to $TESTTMP/.hg/strip-backup/74609c7f506e-1bfde511-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/74609c7f506e-1bfde511-amend.hg (glob)
   1 changesets found
   uncompressed size of bundle content:
        250 (changelog)
        163 (manifests)
        129  a
   adding branch
   adding changesets
   adding manifests
@@ -164,20 +163,20 @@ Disable default date on commit so when -
 Test -u/-d:
 
   $ cat > .hg/checkeditform.sh <<EOF
   > env | grep HGEDITFORM
   > true
   > EOF
   $ HGEDITOR="sh .hg/checkeditform.sh" hg ci --amend -u foo -d '1 0'
   HGEDITFORM=commit.amend.normal
-  saved backup bundle to $TESTTMP/.hg/strip-backup/1cd866679df8-5f5bcb85-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/1cd866679df8-5f5bcb85-amend.hg (glob)
   $ echo a >> a
   $ hg ci --amend -u foo -d '1 0'
-  saved backup bundle to $TESTTMP/.hg/strip-backup/780e6f23e03d-83b10a27-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/780e6f23e03d-83b10a27-amend.hg (glob)
   $ hg log -r .
   changeset:   1:5f357c7560ab
   tag:         tip
   user:        foo
   date:        Thu Jan 01 00:00:01 1970 +0000
   summary:     no changes, new message
   
 
@@ -256,23 +255,22 @@ then, test editing custom commit message
   HG: --
   HG: user: foo
   HG: branch 'default'
   HG: changed a
   committing files:
   a
   committing manifest
   committing changelog
-  stripping amended changeset 5f357c7560ab
   1 changesets found
   uncompressed size of bundle content:
        249 (changelog)
        163 (manifests)
        131  a
-  saved backup bundle to $TESTTMP/.hg/strip-backup/5f357c7560ab-e7c84ade-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/5f357c7560ab-e7c84ade-amend.hg (glob)
   1 changesets found
   uncompressed size of bundle content:
        257 (changelog)
        163 (manifests)
        131  a
   adding branch
   adding changesets
   adding manifests
@@ -298,24 +296,22 @@ Same, but with changes in working dir (d
   HG: --
   HG: user: foo
   HG: branch 'default'
   HG: changed a
   committing files:
   a
   committing manifest
   committing changelog
-  stripping intermediate changeset a0ea9b1a4c8c
-  stripping amended changeset 7ab3bf440b54
   2 changesets found
   uncompressed size of bundle content:
        464 (changelog)
        322 (manifests)
        249  a
-  saved backup bundle to $TESTTMP/.hg/strip-backup/7ab3bf440b54-8e3b5088-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/7ab3bf440b54-8e3b5088-amend.hg (glob)
   1 changesets found
   uncompressed size of bundle content:
        257 (changelog)
        163 (manifests)
        133  a
   adding branch
   adding changesets
   adding manifests
@@ -332,23 +328,23 @@ Same, but with changes in working dir (d
   summary:     another precious commit message
   
 
 Moving bookmarks, preserve active bookmark:
 
   $ hg book book1
   $ hg book book2
   $ hg ci --amend -m 'move bookmarks'
-  saved backup bundle to $TESTTMP/.hg/strip-backup/ea22a388757c-e51094db-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/ea22a388757c-e51094db-amend.hg (glob)
   $ hg book
      book1                     1:6cec5aa930e2
    * book2                     1:6cec5aa930e2
   $ echo a >> a
   $ hg ci --amend -m 'move bookmarks'
-  saved backup bundle to $TESTTMP/.hg/strip-backup/6cec5aa930e2-e9b06de4-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/6cec5aa930e2-e9b06de4-amend.hg (glob)
   $ hg book
      book1                     1:48bb6e53a15f
    * book2                     1:48bb6e53a15f
 
 abort does not loose bookmarks
 
   $ cat > editor.sh << '__EOF__'
   > #!/bin/sh
@@ -374,42 +370,42 @@ Moving branches:
   $ hg branch foo
   marked working directory as branch foo
   (branches are permanent and global, did you want a bookmark?)
   $ echo a >> a
   $ hg ci -m 'branch foo'
   $ hg branch default -f
   marked working directory as branch default
   $ hg ci --amend -m 'back to default'
-  saved backup bundle to $TESTTMP/.hg/strip-backup/8ac881fbf49d-fd962fef-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/8ac881fbf49d-fd962fef-amend.hg (glob)
   $ hg branches
   default                        2:ce12b0b57d46
 
 Close branch:
 
   $ hg up -q 0
   $ echo b >> b
   $ hg branch foo
   marked working directory as branch foo
   (branches are permanent and global, did you want a bookmark?)
   $ hg ci -Am 'fork'
   adding b
   $ echo b >> b
   $ hg ci -mb
   $ hg ci --amend --close-branch -m 'closing branch foo'
-  saved backup bundle to $TESTTMP/.hg/strip-backup/c962248fa264-6701c392-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/c962248fa264-6701c392-amend.hg (glob)
 
 Same thing, different code path:
 
   $ echo b >> b
   $ hg ci -m 'reopen branch'
   reopening closed branch head 4
   $ echo b >> b
   $ hg ci --amend --close-branch
-  saved backup bundle to $TESTTMP/.hg/strip-backup/027371728205-49c0c55d-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/027371728205-49c0c55d-amend.hg (glob)
   $ hg branches
   default                        2:ce12b0b57d46
 
 Refuse to amend during a merge:
 
   $ hg up -q default
   $ hg merge foo
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -420,48 +416,48 @@ Refuse to amend during a merge:
   $ hg ci -m 'merge'
 
 Follow copies/renames:
 
   $ hg mv b c
   $ hg ci -m 'b -> c'
   $ hg mv c d
   $ hg ci --amend -m 'b -> d'
-  saved backup bundle to $TESTTMP/.hg/strip-backup/b8c6eac7f12e-adaaa8b1-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/b8c6eac7f12e-adaaa8b1-amend.hg (glob)
   $ hg st --rev '.^' --copies d
   A d
     b
   $ hg cp d e
   $ hg ci -m 'e = d'
   $ hg cp e f
   $ hg ci --amend -m 'f = d'
-  saved backup bundle to $TESTTMP/.hg/strip-backup/7f9761d65613-d37aa788-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/7f9761d65613-d37aa788-amend.hg (glob)
   $ hg st --rev '.^' --copies f
   A f
     d
 
   $ mv f f.orig
   $ hg rm -A f
   $ hg ci -m removef
   $ hg cp a f
   $ mv f.orig f
   $ hg ci --amend -m replacef
-  saved backup bundle to $TESTTMP/.hg/strip-backup/9e8c5f7e3d95-90259f67-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/9e8c5f7e3d95-90259f67-amend.hg (glob)
   $ hg st --change . --copies
   $ hg log -r . --template "{file_copies}\n"
   
 
 Move added file (issue3410):
 
   $ echo g >> g
   $ hg ci -Am g
   adding g
   $ hg mv g h
   $ hg ci --amend
-  saved backup bundle to $TESTTMP/.hg/strip-backup/24aa8eacce2b-7059e0f1-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/24aa8eacce2b-7059e0f1-amend.hg (glob)
   $ hg st --change . --copies h
   A h
   $ hg log -r . --template "{file_copies}\n"
   
 
 Can't rollback an amend:
 
   $ hg rollback
@@ -471,38 +467,38 @@ Can't rollback an amend:
 Preserve extra dict (issue3430):
 
   $ hg branch a
   marked working directory as branch a
   (branches are permanent and global, did you want a bookmark?)
   $ echo a >> a
   $ hg ci -ma
   $ hg ci --amend -m "a'"
-  saved backup bundle to $TESTTMP/.hg/strip-backup/3837aa2a2fdb-2be01fd1-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/3837aa2a2fdb-2be01fd1-amend.hg (glob)
   $ hg log -r . --template "{branch}\n"
   a
   $ hg ci --amend -m "a''"
-  saved backup bundle to $TESTTMP/.hg/strip-backup/c05c06be7514-ed28c4cd-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/c05c06be7514-ed28c4cd-amend.hg (glob)
   $ hg log -r . --template "{branch}\n"
   a
 
 Also preserve other entries in the dict that are in the old commit,
 first graft something so there's an additional entry:
 
   $ hg up 0 -q
   $ echo z > z
   $ hg ci -Am 'fork'
   adding z
   created new head
   $ hg up 11
   5 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ hg graft 12
   grafting 12:2647734878ef "fork" (tip)
   $ hg ci --amend -m 'graft amend'
-  saved backup bundle to $TESTTMP/.hg/strip-backup/bd010aea3f39-eedb103b-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/bd010aea3f39-eedb103b-amend.hg (glob)
   $ hg log -r . --debug | grep extra
   extra:       amend_source=bd010aea3f39f3fb2a2f884b9ccb0471cd77398e
   extra:       branch=a
   extra:       source=2647734878ef0236dda712fae9c1651cf694ea8a
 
 Preserve phase
 
   $ hg phase '.^::.'
--- a/tests/test-commit-interactive-curses.t
+++ b/tests/test-commit-interactive-curses.t
@@ -201,17 +201,17 @@ Amend option works
   +++ b/x	Thu Jan 01 00:00:00 1970 +0000
   @@ -0,0 +1,1 @@
   +hello
   $ cat <<EOF >testModeCommands
   > a
   > X
   > EOF
   $ hg commit -i  -m "newly added file" -d "0 0"
-  saved backup bundle to $TESTTMP/a/.hg/strip-backup/2b0e9be4d336-28bbe4e2-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a/.hg/strip-backup/2b0e9be4d336-28bbe4e2-amend.hg (glob)
   $ hg diff -c .
   diff -r a6735021574d -r c1d239d165ae x
   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   +++ b/x	Thu Jan 01 00:00:00 1970 +0000
   @@ -0,0 +1,1 @@
   +hello world
 
 Editing a hunk puts you back on that hunk when done editing (issue5041)
--- a/tests/test-treemanifest.t
+++ b/tests/test-treemanifest.t
@@ -857,13 +857,13 @@ other branch
   added 1 changesets with 1 changes to 1 files (+1 heads)
   (run 'hg heads' to see heads, 'hg merge' to merge)
 
 Committing a empty commit does not duplicate root treemanifest
   $ echo z >> z
   $ hg commit -Aqm 'pre-empty commit'
   $ hg rm z
   $ hg commit --amend -m 'empty commit'
-  saved backup bundle to $TESTTMP/grafted-dir-repo-clone/.hg/strip-backup/cb99d5717cea-de37743b-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/grafted-dir-repo-clone/.hg/strip-backup/cb99d5717cea-de37743b-amend.hg (glob)
   $ hg log -r 'tip + tip^' -T '{manifest}\n'
   1:678d3574b88c
   1:678d3574b88c
   $ hg --config extensions.strip= strip -r . -q