[PATCH] bundles: do not overwrite existing backup bundles

Durham Goode durham at fb.com
Sat Jan 10 01:30:43 UTC 2015


# HG changeset patch
# User Durham Goode <durham at fb.com>
# Date 1420829534 28800
#      Fri Jan 09 10:52:14 2015 -0800
# Node ID 050122fb8a8d31fc34063f0d56d7e97d8cad61c0
# Parent  678f53865c6860a950392691814766957ee89316
bundles: do not overwrite existing backup bundles

Previously, a backup bundle could overwrite an existing bundle and cause user
data loss. For instance, if you have A<-B<-C and strip B, it produces backup
bundle B-backup.hg. If you then hg pull -r B B-backup.hg and strip it again, it
overwrites the existing B-backup.hg and C is lost.

The fix is to add a hash of all the nodes inside that bundle to the filename.
Fixed up existing tests and added a new test in test-strip.t

diff --git a/mercurial/repair.py b/mercurial/repair.py
--- a/mercurial/repair.py
+++ b/mercurial/repair.py
@@ -6,8 +6,8 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
-from mercurial import changegroup, exchange
-from mercurial.node import short
+from mercurial import changegroup, exchange, util
+from mercurial.node import short, hex
 from mercurial.i18n import _
 import errno
 
@@ -18,7 +18,14 @@ def _bundle(repo, bases, heads, node, su
     vfs = repo.vfs
     if not vfs.isdir(backupdir):
         vfs.mkdir(backupdir)
-    name = "%s/%s-%s.hg" % (backupdir, short(node), suffix)
+
+    # Include a hash of all the nodes in the filename for uniqueness
+    hexbases = (hex(n) for n in bases)
+    hexheads = (hex(n) for n in heads)
+    allcommits = repo.set('%ls::%ls', hexbases, hexheads)
+    allhash = util.sha1(''.join(c.hex() for c in allcommits)).hexdigest()
+    name = "%s/%s-%s-%s.hg" % (backupdir, short(node), allhash[:8], suffix)
+
     if compress:
         bundletype = "HG10BZ"
     else:
diff --git a/tests/test-bookmarks-rebase.t b/tests/test-bookmarks-rebase.t
--- a/tests/test-bookmarks-rebase.t
+++ b/tests/test-bookmarks-rebase.t
@@ -38,7 +38,7 @@ rebase
 
   $ hg rebase -s two -d one
   rebasing 3:2ae46b1d99a7 "3" (tip two)
-  saved backup bundle to $TESTTMP/.hg/strip-backup/2ae46b1d99a7-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/2ae46b1d99a7-e6b057bc-backup.hg (glob)
 
   $ hg log
   changeset:   3:42e5ed2cdcf4
diff --git a/tests/test-commit-amend.t b/tests/test-commit-amend.t
--- a/tests/test-commit-amend.t
+++ b/tests/test-commit-amend.t
@@ -35,7 +35,7 @@ Amending changeset with changes in worki
   $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -m 'amend base1'
   pretxncommit 43f1ba15f28a50abf0aae529cf8a16bfced7b149
   43f1ba15f28a tip
-  saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d-f1bf3ab8-amend-backup.hg (glob)
   $ echo 'pretxncommit.foo = ' >> $HGRCPATH
   $ hg diff -c .
   diff -r ad120869acf0 -r 43f1ba15f28a a
@@ -86,7 +86,7 @@ Check proper abort for empty message
 
 Add new file:
   $ hg ci --amend -m 'amend base1 new file'
-  saved backup bundle to $TESTTMP/.hg/strip-backup/43f1ba15f28a-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/43f1ba15f28a-9fe10f76-amend-backup.hg (glob)
 
 Remove file that was added in amended commit:
 (and test logfile option)
@@ -95,7 +95,7 @@ Remove file that was added in amended co
   $ 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-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/b8e3cb2b3882-2377e2d1-amend-backup.hg (glob)
 
   $ hg cat b
   b: no such file in rev 74609c7f506e
@@ -116,7 +116,7 @@ No changes, just a different message:
        250 (changelog)
        143 (manifests)
        109  a
-  saved backup bundle to $TESTTMP/.hg/strip-backup/74609c7f506e-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/74609c7f506e-1bfde511-amend-backup.hg (glob)
   1 changesets found
   uncompressed size of bundle content:
        246 (changelog)
@@ -162,10 +162,10 @@ Test -u/-d:
   > 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-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/1cd866679df8-5f5bcb85-amend-backup.hg (glob)
   $ echo a >> a
   $ hg ci --amend -u foo -d '1 0'
-  saved backup bundle to $TESTTMP/.hg/strip-backup/780e6f23e03d-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/780e6f23e03d-8e792e56-amend-backup.hg (glob)
   $ hg log -r .
   changeset:   1:5f357c7560ab
   tag:         tip
@@ -260,7 +260,7 @@ then, test editing custom commit message
        238 (changelog)
        143 (manifests)
        111  a
-  saved backup bundle to $TESTTMP/.hg/strip-backup/5f357c7560ab-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/5f357c7560ab-e7c84ade-amend-backup.hg (glob)
   1 changesets found
   uncompressed size of bundle content:
        246 (changelog)
@@ -303,7 +303,7 @@ Same, but with changes in working dir (d
        450 (changelog)
        282 (manifests)
        209  a
-  saved backup bundle to $TESTTMP/.hg/strip-backup/7ab3bf440b54-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/7ab3bf440b54-8e3b5088-amend-backup.hg (glob)
   1 changesets found
   uncompressed size of bundle content:
        246 (changelog)
@@ -330,13 +330,13 @@ Moving bookmarks, preserve active bookma
   $ hg book book1
   $ hg book book2
   $ hg ci --amend -m 'move bookmarks'
-  saved backup bundle to $TESTTMP/.hg/strip-backup/ea22a388757c-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/ea22a388757c-e51094db-amend-backup.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-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/6cec5aa930e2-e9b06de4-amend-backup.hg (glob)
   $ hg book
      book1                     1:48bb6e53a15f
    * book2                     1:48bb6e53a15f
@@ -373,7 +373,7 @@ Moving branches:
   marked working directory as branch default
   (branches are permanent and global, did you want a bookmark?)
   $ hg ci --amend -m 'back to default'
-  saved backup bundle to $TESTTMP/.hg/strip-backup/8ac881fbf49d-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/8ac881fbf49d-fd962fef-amend-backup.hg (glob)
   $ hg branches
   default                        2:ce12b0b57d46
 
@@ -389,7 +389,7 @@ Close branch:
   $ echo b >> b
   $ hg ci -mb
   $ hg ci --amend --close-branch -m 'closing branch foo'
-  saved backup bundle to $TESTTMP/.hg/strip-backup/c962248fa264-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/c962248fa264-59e4249c-amend-backup.hg (glob)
 
 Same thing, different code path:
 
@@ -398,7 +398,7 @@ Same thing, different code path:
   reopening closed branch head 4
   $ echo b >> b
   $ hg ci --amend --close-branch
-  saved backup bundle to $TESTTMP/.hg/strip-backup/027371728205-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/027371728205-49c0c55d-amend-backup.hg (glob)
   $ hg branches
   default                        2:ce12b0b57d46
 
@@ -419,7 +419,7 @@ Follow copies/renames:
   $ hg ci -m 'b -> c'
   $ hg mv c d
   $ hg ci --amend -m 'b -> d'
-  saved backup bundle to $TESTTMP/.hg/strip-backup/b8c6eac7f12e-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/b8c6eac7f12e-adaaa8b1-amend-backup.hg (glob)
   $ hg st --rev '.^' --copies d
   A d
     b
@@ -427,7 +427,7 @@ Follow copies/renames:
   $ hg ci -m 'e = d'
   $ hg cp e f
   $ hg ci --amend -m 'f = d'
-  saved backup bundle to $TESTTMP/.hg/strip-backup/7f9761d65613-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/7f9761d65613-d37aa788-amend-backup.hg (glob)
   $ hg st --rev '.^' --copies f
   A f
     d
@@ -438,7 +438,7 @@ Follow copies/renames:
   $ hg cp a f
   $ mv f.orig f
   $ hg ci --amend -m replacef
-  saved backup bundle to $TESTTMP/.hg/strip-backup/9e8c5f7e3d95-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/9e8c5f7e3d95-b848e7eb-amend-backup.hg (glob)
   $ hg st --change . --copies
   $ hg log -r . --template "{file_copies}\n"
   
@@ -450,7 +450,7 @@ Move added file (issue3410):
   adding g
   $ hg mv g h
   $ hg ci --amend
-  saved backup bundle to $TESTTMP/.hg/strip-backup/24aa8eacce2b-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/24aa8eacce2b-7059e0f1-amend-backup.hg (glob)
   $ hg st --change . --copies h
   A h
   $ hg log -r . --template "{file_copies}\n"
@@ -470,11 +470,11 @@ Preserve extra dict (issue3430):
   $ echo a >> a
   $ hg ci -ma
   $ hg ci --amend -m "a'"
-  saved backup bundle to $TESTTMP/.hg/strip-backup/3837aa2a2fdb-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/3837aa2a2fdb-2be01fd1-amend-backup.hg (glob)
   $ hg log -r . --template "{branch}\n"
   a
   $ hg ci --amend -m "a''"
-  saved backup bundle to $TESTTMP/.hg/strip-backup/c05c06be7514-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/c05c06be7514-ed28c4cd-amend-backup.hg (glob)
   $ hg log -r . --template "{branch}\n"
   a
 
@@ -491,7 +491,7 @@ first graft something so there's an addi
   $ hg graft 12
   grafting 12:2647734878ef "fork" (tip)
   $ hg ci --amend -m 'graft amend'
-  saved backup bundle to $TESTTMP/.hg/strip-backup/bd010aea3f39-amend-backup.hg (glob)
+  saved backup bundle to $TESTTMP/.hg/strip-backup/bd010aea3f39-eedb103b-amend-backup.hg (glob)
   $ hg log -r . --debug | grep extra
   extra:       amend_source=bd010aea3f39f3fb2a2f884b9ccb0471cd77398e
   extra:       branch=a
diff --git a/tests/test-convert-filemap.t b/tests/test-convert-filemap.t
--- a/tests/test-convert-filemap.t
+++ b/tests/test-convert-filemap.t
@@ -637,7 +637,7 @@ test named branch pruning
   $ cd namedbranch
   $ hg --config extensions.mq= strip tip
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  saved backup bundle to $TESTTMP/namedbranch/.hg/strip-backup/73899bcbe45c-backup.hg (glob)
+  saved backup bundle to $TESTTMP/namedbranch/.hg/strip-backup/73899bcbe45c-92adf160-backup.hg (glob)
   $ hg up foo
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg merge default
diff --git a/tests/test-convert-svn-sink.t b/tests/test-convert-svn-sink.t
--- a/tests/test-convert-svn-sink.t
+++ b/tests/test-convert-svn-sink.t
@@ -256,7 +256,7 @@ Make sure our changes don't affect the r
   $ hg --cwd a up 5
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ hg --cwd a --config extensions.strip= strip -r 6
-  saved backup bundle to $TESTTMP/a/.hg/strip-backup/bd4f7b7a7067-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a/.hg/strip-backup/bd4f7b7a7067-03a3587e-backup.hg (glob)
 
 #endif
 
diff --git a/tests/test-graft.t b/tests/test-graft.t
--- a/tests/test-graft.t
+++ b/tests/test-graft.t
@@ -712,7 +712,7 @@ but do some destructive editing of the r
   $ hg up -qC 7
   $ hg tag -l -r 13 tmp
   $ hg --config extensions.strip= strip 2
-  saved backup bundle to $TESTTMP/a/.hg/strip-backup/5c095ad7e90f-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a/.hg/strip-backup/5c095ad7e90f-de7a70e6-backup.hg (glob)
   $ hg graft tmp
   skipping already grafted revision 8:9db0f28fd374 (2:ef0ef43d49e7 also has unknown origin 5c095ad7e90f)
   [255]
diff --git a/tests/test-hgweb-bundle.t b/tests/test-hgweb-bundle.t
--- a/tests/test-hgweb-bundle.t
+++ b/tests/test-hgweb-bundle.t
@@ -18,11 +18,11 @@ Produce a bundle to use
 
   $ hg strip -r 1
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  saved backup bundle to $TESTTMP/server/.hg/strip-backup/ed602e697e0f-backup.hg (glob)
+  saved backup bundle to $TESTTMP/server/.hg/strip-backup/ed602e697e0f-cc9fff6a-backup.hg (glob)
 
 Serve from a bundle file
 
-  $ hg serve -R .hg/strip-backup/ed602e697e0f-backup.hg -d -p $HGPORT --pid-file=hg.pid
+  $ hg serve -R .hg/strip-backup/ed602e697e0f-cc9fff6a-backup.hg -d -p $HGPORT --pid-file=hg.pid
   $ cat hg.pid >> $DAEMON_PIDS
 
 Ensure we're serving from the bundle
diff --git a/tests/test-histedit-bookmark-motion.t b/tests/test-histedit-bookmark-motion.t
--- a/tests/test-histedit-bookmark-motion.t
+++ b/tests/test-histedit-bookmark-motion.t
@@ -91,8 +91,8 @@
   histedit: moving bookmarks three from 055a42cdd887 to 59d9f330561f
   histedit: moving bookmarks two from 177f92b77385 to b346ab9a313d
   histedit: moving bookmarks will-move-backwards from d2ae7f538514 to cb9a9f314b8b
-  saved backup bundle to $TESTTMP/r/.hg/strip-backup/d2ae7f538514-backup.hg (glob)
-  saved backup bundle to $TESTTMP/r/.hg/strip-backup/96e494a2d553-backup.hg (glob)
+  saved backup bundle to $TESTTMP/r/.hg/strip-backup/d2ae7f538514-c3d61782-backup.hg (glob)
+  saved backup bundle to $TESTTMP/r/.hg/strip-backup/96e494a2d553-60cea58b-backup.hg (glob)
   $ hg log --graph
   @  changeset:   3:cacdfd884a93
   |  bookmark:    five
@@ -147,7 +147,7 @@
   histedit: moving bookmarks five from cacdfd884a93 to c04e50810e4b
   histedit: moving bookmarks four from 59d9f330561f to c04e50810e4b
   histedit: moving bookmarks three from 59d9f330561f to c04e50810e4b
-  saved backup bundle to $TESTTMP/r/.hg/strip-backup/59d9f330561f-backup.hg (glob)
+  saved backup bundle to $TESTTMP/r/.hg/strip-backup/59d9f330561f-073008af-backup.hg (glob)
 
 We expect 'five' to stay at tip, since the tipmost bookmark is most
 likely the useful signal.
diff --git a/tests/test-histedit-edit.t b/tests/test-histedit-edit.t
--- a/tests/test-histedit-edit.t
+++ b/tests/test-histedit-edit.t
@@ -170,7 +170,7 @@ check histedit_source
   HG: branch 'default'
   HG: added f
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  saved backup bundle to $TESTTMP/r/.hg/strip-backup/b5f70786f9b0-backup.hg (glob)
+  saved backup bundle to $TESTTMP/r/.hg/strip-backup/b5f70786f9b0-c28d9c86-backup.hg (glob)
 
   $ hg status
 
@@ -342,4 +342,4 @@ rollback should not work after a histedi
   [1]
   $ HGEDITOR=true hg histedit --continue
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  saved backup bundle to $TESTTMP/r0/.hg/strip-backup/cb9a9f314b8b-backup.hg (glob)
+  saved backup bundle to $TESTTMP/r0/.hg/strip-backup/cb9a9f314b8b-cc5ccb0b-backup.hg (glob)
diff --git a/tests/test-histedit-fold.t b/tests/test-histedit-fold.t
--- a/tests/test-histedit-fold.t
+++ b/tests/test-histedit-fold.t
@@ -387,7 +387,7 @@ dropped revision.
   HG: changed file
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  saved backup bundle to $TESTTMP/fold-with-dropped/.hg/strip-backup/617f94f13c0f-backup.hg (glob)
+  saved backup bundle to $TESTTMP/fold-with-dropped/.hg/strip-backup/617f94f13c0f-a280080a-backup.hg (glob)
   $ hg logt -G
   @  1:10c647b2cdd5 +4
   |
diff --git a/tests/test-histedit-obsolete.t b/tests/test-histedit-obsolete.t
--- a/tests/test-histedit-obsolete.t
+++ b/tests/test-histedit-obsolete.t
@@ -64,7 +64,7 @@ Enable obsolete
   > fold e860deea161a 4 e
   > pick 652413bf663e 5 f
   > EOF
-  saved backup bundle to $TESTTMP/base/.hg/strip-backup/96e494a2d553-backup.hg (glob)
+  saved backup bundle to $TESTTMP/base/.hg/strip-backup/96e494a2d553-60cea58b-backup.hg (glob)
   $ hg log --graph --hidden
   @  8:cacdfd884a93 f
   |
@@ -427,9 +427,9 @@ Note that there is a few reordering in t
   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  saved backup bundle to $TESTTMP/folding/.hg/strip-backup/58019c66f35f-backup.hg (glob)
-  saved backup bundle to $TESTTMP/folding/.hg/strip-backup/83d1858e070b-backup.hg (glob)
-  saved backup bundle to $TESTTMP/folding/.hg/strip-backup/859969f5ed7e-backup.hg (glob)
+  saved backup bundle to $TESTTMP/folding/.hg/strip-backup/58019c66f35f-be4b3835-backup.hg (glob)
+  saved backup bundle to $TESTTMP/folding/.hg/strip-backup/83d1858e070b-08306a6b-backup.hg (glob)
+  saved backup bundle to $TESTTMP/folding/.hg/strip-backup/859969f5ed7e-b14fb6af-backup.hg (glob)
   $ hg log -G
   @  19:f9daec13fb98 (secret) i
   |
diff --git a/tests/test-largefiles-update.t b/tests/test-largefiles-update.t
--- a/tests/test-largefiles-update.t
+++ b/tests/test-largefiles-update.t
@@ -366,15 +366,15 @@ Test that the internal linear merging wo
 
   $ hg update -q -C 2
   $ hg strip 3 4
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/9530e27857f7-backup.hg (glob)
-  $ mv .hg/strip-backup/9530e27857f7-backup.hg $TESTTMP
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/9530e27857f7-01874b66-backup.hg (glob)
+  $ mv .hg/strip-backup/9530e27857f7-01874b66-backup.hg $TESTTMP
 
 (internal linear merging at "hg pull --update")
 
   $ echo 'large1 for linear merge (conflict)' > large1
   $ echo 'large2 for linear merge (conflict with normal file)' > large2
-  $ hg pull --update --config debug.dirstate.delaywrite=2 $TESTTMP/9530e27857f7-backup.hg
-  pulling from $TESTTMP/9530e27857f7-backup.hg (glob)
+  $ hg pull --update --config debug.dirstate.delaywrite=2 $TESTTMP/9530e27857f7-01874b66-backup.hg
+  pulling from $TESTTMP/9530e27857f7-01874b66-backup.hg (glob)
   searching for changes
   adding changesets
   adding manifests
@@ -408,7 +408,7 @@ Test that the internal linear merging wo
 
   $ echo 'large1 for linear merge (conflict)' > large1
   $ echo 'large2 for linear merge (conflict with normal file)' > large2
-  $ hg unbundle --update --config debug.dirstate.delaywrite=2 $TESTTMP/9530e27857f7-backup.hg
+  $ hg unbundle --update --config debug.dirstate.delaywrite=2 $TESTTMP/9530e27857f7-01874b66-backup.hg
   adding changesets
   adding manifests
   adding file changes
diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t
--- a/tests/test-largefiles.t
+++ b/tests/test-largefiles.t
@@ -1188,7 +1188,7 @@ rebased or not.
   Invoking status precommit hook
   M sub/normal4
   M sub2/large6
-  saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob)
+  saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-dd1d9f80-backup.hg (glob)
   $ [ -f .hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 ]
   $ hg log --template '{rev}:{node|short}  {desc|firstline}\n'
   9:598410d3eb9a  modify normal file largefile in repo d
@@ -1246,7 +1246,7 @@ rebased or not.
   Invoking status precommit hook
   M sub/normal4
   M sub2/large6
-  saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg (glob)
+  saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-dd1d9f80-backup.hg (glob)
   $ hg log --template '{rev}:{node|short}  {desc|firstline}\n'
   9:598410d3eb9a  modify normal file largefile in repo d
   8:a381d2c8c80e  modify normal file and largefile in repo b
diff --git a/tests/test-mq.t b/tests/test-mq.t
--- a/tests/test-mq.t
+++ b/tests/test-mq.t
@@ -801,7 +801,7 @@ strip with local changes, should complai
 
   $ hg strip -f tip
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob)
+  saved backup bundle to $TESTTMP/b/.hg/strip-backup/770eb8fce608-0ddcae0f-backup.hg (glob)
   $ cd ..
 
 
diff --git a/tests/test-rebase-abort.t b/tests/test-rebase-abort.t
--- a/tests/test-rebase-abort.t
+++ b/tests/test-rebase-abort.t
@@ -72,7 +72,7 @@ Conflicting rebase:
 Abort:
 
   $ hg rebase --abort
-  saved backup bundle to $TESTTMP/a/.hg/strip-backup/3e046f2ecedb-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a/.hg/strip-backup/3e046f2ecedb-6beef7d5-backup.hg (glob)
   rebase aborted
 
   $ hg tglog
diff --git a/tests/test-rebase-bookmarks.t b/tests/test-rebase-bookmarks.t
--- a/tests/test-rebase-bookmarks.t
+++ b/tests/test-rebase-bookmarks.t
@@ -75,7 +75,7 @@ Test deleting divergent bookmarks from d
   
   $ hg rebase -s Y -d 3
   rebasing 2:49cb3485fa0c "C" (Y Z)
-  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/49cb3485fa0c-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/49cb3485fa0c-126f3e97-backup.hg (glob)
 
   $ hg tglog
   @  3: 'C' bookmarks: Y Z
@@ -97,7 +97,7 @@ Do not try to keep active but deleted di
 
   $ hg rebase -s W -d .
   rebasing 3:41acb9dca9eb "D" (tip W)
-  saved backup bundle to $TESTTMP/a4/.hg/strip-backup/41acb9dca9eb-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a4/.hg/strip-backup/41acb9dca9eb-b35a6a63-backup.hg (glob)
 
   $ hg bookmarks
      W                         3:0d3554f74897
@@ -116,7 +116,7 @@ Keep bookmarks to the correct rebased ch
   $ hg rebase -s 1 -d 3
   rebasing 1:6c81ed0049f8 "B" (X)
   rebasing 2:49cb3485fa0c "C" (Y Z)
-  saved backup bundle to $TESTTMP/a2/.hg/strip-backup/6c81ed0049f8-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a2/.hg/strip-backup/6c81ed0049f8-bce35d74-backup.hg (glob)
 
   $ hg tglog
   @  3: 'C' bookmarks: Y Z
@@ -139,7 +139,7 @@ Keep active bookmark on the correct chan
   $ hg rebase -d W
   rebasing 1:6c81ed0049f8 "B" (X)
   rebasing 2:49cb3485fa0c "C" (Y Z)
-  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/6c81ed0049f8-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/6c81ed0049f8-bce35d74-backup.hg (glob)
 
   $ hg tglog
   o  3: 'C' bookmarks: Y Z
@@ -179,7 +179,7 @@ rebase --continue with bookmarks present
   (no more unresolved files)
   $ hg rebase --continue
   rebasing 3:3d5fa227f4b5 "C" (Y Z)
-  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/3d5fa227f4b5-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/3d5fa227f4b5-c6ea2371-backup.hg (glob)
   $ hg tglog
   @  4: 'C' bookmarks: Y Z
   |
@@ -209,4 +209,4 @@ as --rev arguments (issue3950)
   rebasing 5:345c90f326a4 "bisect"
   rebasing 6:f677a2907404 "bisect2"
   rebasing 7:325c16001345 "bisect3" (tip bisect)
-  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/345c90f326a4-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/345c90f326a4-8f4eb451-backup.hg (glob)
diff --git a/tests/test-rebase-cache.t b/tests/test-rebase-cache.t
--- a/tests/test-rebase-cache.t
+++ b/tests/test-rebase-cache.t
@@ -107,7 +107,7 @@ Rebase part of branch2 (5-6) onto branch
   $ hg rebase -s 5 -d 8
   rebasing 5:635859577d0b "D"
   rebasing 6:5097051d331d "E"
-  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/635859577d0b-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/635859577d0b-88a76578-backup.hg (glob)
 
   $ hg branches
   branch3                        8:466cdfb14b62
@@ -169,7 +169,7 @@ Rebase head of branch3 (8) onto branch2 
   
   $ hg rebase -s 8 -d 6
   rebasing 8:4666b71e8e32 "F" (tip)
-  saved backup bundle to $TESTTMP/a2/.hg/strip-backup/4666b71e8e32-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a2/.hg/strip-backup/4666b71e8e32-fc1c4e96-backup.hg (glob)
 
   $ hg branches
   branch2                        8:6b4bdc1b5ac0
@@ -236,7 +236,7 @@ Rebase entire branch3 (7-8) onto branch2
   rebasing 7:653b9feb4616 "branch3"
   note: rebase of 7:653b9feb4616 created no changes to commit
   rebasing 8:4666b71e8e32 "F" (tip)
-  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/653b9feb4616-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/653b9feb4616-158939e1-backup.hg (glob)
 
   $ hg branches
   branch2                        7:6b4bdc1b5ac0
@@ -273,7 +273,7 @@ update the branch cache.
 
   $ hg strip 2
   0 files updated, 0 files merged, 4 files removed, 0 files unresolved
-  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/0a03079c47fd-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/0a03079c47fd-8eb663fa-backup.hg (glob)
 
   $ hg tglog
   o  3: 'C' branch2
@@ -334,7 +334,7 @@ the same as branches remaining.
 
   $ hg strip 2
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  saved backup bundle to $TESTTMP/a3/b/.hg/strip-backup/a5b4b27ed7b4-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a3/b/.hg/strip-backup/a5b4b27ed7b4-a3b6984e-backup.hg (glob)
 
   $ hg theads
   1: 'branch2' branch2
@@ -379,14 +379,14 @@ Try both orders.
 
   $ hg strip 3 4
   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  saved backup bundle to $TESTTMP/a3/c/.hg/strip-backup/67a385d4e6f2-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a3/c/.hg/strip-backup/67a385d4e6f2-b9243789-backup.hg (glob)
 
   $ hg theads
   2: 'C' 
 
   $ hg strip 2 1
   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  saved backup bundle to $TESTTMP/a3/c/.hg/strip-backup/6c81ed0049f8-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a3/c/.hg/strip-backup/6c81ed0049f8-bce35d74-backup.hg (glob)
 
   $ hg theads
   0: 'A' 
@@ -485,4 +485,4 @@ Turn most changeset public
   HGEDITFORM=rebase.merge
   rebasing 8:326cfedc031c "I" (tip)
   HGEDITFORM=rebase.normal
-  saved backup bundle to $TESTTMP/a3/c4/.hg/strip-backup/361a99976cc9-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a3/c4/.hg/strip-backup/361a99976cc9-8642f1d9-backup.hg (glob)
diff --git a/tests/test-rebase-check-restore.t b/tests/test-rebase-check-restore.t
--- a/tests/test-rebase-check-restore.t
+++ b/tests/test-rebase-check-restore.t
@@ -138,7 +138,7 @@ Solve the conflict and go on:
   (no more unresolved files)
   $ hg rebase --continue
   rebasing 5:01e6ebbd8272 "F" (tip)
-  saved backup bundle to $TESTTMP/a2/.hg/strip-backup/01e6ebbd8272-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a2/.hg/strip-backup/01e6ebbd8272-6fd3a015-backup.hg (glob)
 
   $ hg tglog
   @  5:draft 'F' notdefault
diff --git a/tests/test-rebase-collapse.t b/tests/test-rebase-collapse.t
--- a/tests/test-rebase-collapse.t
+++ b/tests/test-rebase-collapse.t
@@ -81,7 +81,7 @@ Rebasing B onto H and collapsing changes
   HG: added C
   HG: added D
   ====
-  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-23acd8ba-backup.hg (glob)
 
   $ hg tglogp
   @  5:secret 'Collapsed revision
@@ -123,7 +123,7 @@ Rebasing E onto H:
   note: rebase of 4:9520eea781bc created no changes to commit
   rebasing 6:eea13746799a "G"
   note: rebase of 6:eea13746799a created no changes to commit
-  saved backup bundle to $TESTTMP/a2/.hg/strip-backup/9520eea781bc-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a2/.hg/strip-backup/9520eea781bc-fcd8edd4-backup.hg (glob)
 
   $ hg tglog
   o  6: 'Collapsed revision
@@ -168,7 +168,7 @@ Rebasing G onto H with custom message:
   rebasing 6:eea13746799a "G"
   note: rebase of 6:eea13746799a created no changes to commit
   HGEDITFORM=rebase.collapse
-  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/9520eea781bc-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/9520eea781bc-fcd8edd4-backup.hg (glob)
 
   $ hg tglog
   o  6: 'custom message'
@@ -281,7 +281,7 @@ Rebase and collapse - E onto H:
   note: rebase of 5:7f219660301f created no changes to commit
   rebasing 6:c772a8b2dc17 "G"
   note: rebase of 6:c772a8b2dc17 created no changes to commit
-  saved backup bundle to $TESTTMP/b1/.hg/strip-backup/8a5212ebc852-backup.hg (glob)
+  saved backup bundle to $TESTTMP/b1/.hg/strip-backup/8a5212ebc852-dcdc14d7-backup.hg (glob)
 
   $ hg tglog
   o    5: 'Collapsed revision
@@ -330,7 +330,7 @@ We keep it the test this way in case new
   c65502d4178782309ce0574c5ae6ee9485a9bafa o default
 
   $ hg strip 4
-  saved backup bundle to $TESTTMP/b2/.hg/strip-backup/8a5212ebc852-backup.hg (glob)
+  saved backup bundle to $TESTTMP/b2/.hg/strip-backup/8a5212ebc852-dcdc14d7-backup.hg (glob)
 
   $ cat $TESTTMP/b2/.hg/cache/branch2-served
   c65502d4178782309ce0574c5ae6ee9485a9bafa 4
@@ -438,7 +438,7 @@ Rebase and collapse - E onto I:
   note: rebase of 6:55a44ad28289 created no changes to commit
   rebasing 7:417d3b648079 "H"
   note: rebase of 7:417d3b648079 created no changes to commit
-  saved backup bundle to $TESTTMP/c1/.hg/strip-backup/8a5212ebc852-backup.hg (glob)
+  saved backup bundle to $TESTTMP/c1/.hg/strip-backup/8a5212ebc852-bf187df3-backup.hg (glob)
 
   $ hg tglog
   o    5: 'Collapsed revision
@@ -535,7 +535,7 @@ Rebase and collapse - B onto F:
   note: rebase of 3:7bbcd6078bcc created no changes to commit
   rebasing 4:0a42590ed746 "E"
   note: rebase of 4:0a42590ed746 created no changes to commit
-  saved backup bundle to $TESTTMP/d1/.hg/strip-backup/27547f69f254-backup.hg (glob)
+  saved backup bundle to $TESTTMP/d1/.hg/strip-backup/27547f69f254-3838f4a0-backup.hg (glob)
 
   $ hg tglog
   o  2: 'Collapsed revision
@@ -621,7 +621,7 @@ Interactions between collapse and keepbr
   $ hg rebase -s 5 -d 4
   rebasing 5:fbfb97b1089a "E" (tip)
   note: rebase of 5:fbfb97b1089a created no changes to commit
-  saved backup bundle to $TESTTMP/e/.hg/strip-backup/fbfb97b1089a-backup.hg (glob)
+  saved backup bundle to $TESTTMP/e/.hg/strip-backup/fbfb97b1089a-553e1d85-backup.hg (glob)
   $ hg tglog
   @  4: 'E'
   |
@@ -681,7 +681,7 @@ Rebase, collapse and copies
   merging f and c to c
   merging e and g to g
   note: rebase of 3:338e84e2e558 created no changes to commit
-  saved backup bundle to $TESTTMP/copies/.hg/strip-backup/6e7340ee38c0-backup.hg (glob)
+  saved backup bundle to $TESTTMP/copies/.hg/strip-backup/6e7340ee38c0-223ae5e8-backup.hg (glob)
   $ hg st
   $ hg st --copies --change tip
   A d
@@ -724,7 +724,7 @@ Test collapsing in place
   note: rebase of 1:1352765a01d4 created no changes to commit
   rebasing 2:64b456429f67 "Collapsed revision" (tip)
   note: rebase of 2:64b456429f67 created no changes to commit
-  saved backup bundle to $TESTTMP/copies/.hg/strip-backup/1352765a01d4-backup.hg (glob)
+  saved backup bundle to $TESTTMP/copies/.hg/strip-backup/1352765a01d4-45a352ea-backup.hg (glob)
   $ hg st --change tip --copies
   M a
   M c
@@ -783,7 +783,7 @@ Test stripping a revision with another c
 
   $ hg strip 2
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  saved backup bundle to $TESTTMP/f/.hg/strip-backup/c5cefa58fd55-backup.hg (glob)
+  saved backup bundle to $TESTTMP/f/.hg/strip-backup/c5cefa58fd55-629429f4-backup.hg (glob)
 
   $ hg tglog
   o  1: 'B'
@@ -818,7 +818,7 @@ Test collapsing changes that add then re
   note: rebase of 1:6d8d9f24eec3 created no changes to commit
   rebasing 2:1cc73eca5ecc "b" (tip foo)
   note: rebase of 2:1cc73eca5ecc created no changes to commit
-  saved backup bundle to $TESTTMP/collapseaddremove/.hg/strip-backup/6d8d9f24eec3-backup.hg (glob)
+  saved backup bundle to $TESTTMP/collapseaddremove/.hg/strip-backup/6d8d9f24eec3-7b91f88f-backup.hg (glob)
   $ hg log -G --template "{rev}: '{desc}' {bookmarks}"
   @  1: 'collapsed' foo
   |
diff --git a/tests/test-rebase-conflicts.t b/tests/test-rebase-conflicts.t
--- a/tests/test-rebase-conflicts.t
+++ b/tests/test-rebase-conflicts.t
@@ -86,7 +86,7 @@ Conclude rebase:
   already rebased 3:3163e20567cc "L1" as 3e046f2ecedb
   rebasing 4:46f0b057b5c0 "L2"
   rebasing 5:8029388f38dc "L3" (mybook)
-  saved backup bundle to $TESTTMP/a/.hg/strip-backup/3163e20567cc-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a/.hg/strip-backup/3163e20567cc-5ca4656e-backup.hg (glob)
 
   $ hg tglog
   @  5:secret 'L3'  mybook
@@ -292,7 +292,7 @@ Check that the right ancestors is used w
   bundling: 2/3 manifests (66.67%)
   bundling: 3/3 manifests (100.00%)
   bundling: f1.txt 1/1 files (100.00%)
-  saved backup bundle to $TESTTMP/issue4041/.hg/strip-backup/e31216eec445-backup.hg (glob)
+  saved backup bundle to $TESTTMP/issue4041/.hg/strip-backup/e31216eec445-d7ce5a7f-backup.hg (glob)
   3 changesets found
   list of changesets:
   4c9fbe56a16f30c0d5dcc40ec1a97bbe3325209c
diff --git a/tests/test-rebase-detach.t b/tests/test-rebase-detach.t
--- a/tests/test-rebase-detach.t
+++ b/tests/test-rebase-detach.t
@@ -49,7 +49,7 @@ Rebasing D onto H detaching from C:
   $ hg phase --force --secret 3
   $ hg rebase -s 3 -d 7
   rebasing 3:32af7686d403 "D"
-  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/32af7686d403-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/32af7686d403-6f7dface-backup.hg (glob)
 
   $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n"
   o  7:secret 'D'
@@ -102,7 +102,7 @@ Rebasing C onto H detaching from B:
   $ hg rebase -s 2 -d 7
   rebasing 2:5fddd98957c8 "C"
   rebasing 3:32af7686d403 "D"
-  saved backup bundle to $TESTTMP/a2/.hg/strip-backup/5fddd98957c8-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a2/.hg/strip-backup/5fddd98957c8-c954f3af-backup.hg (glob)
 
   $ hg tglog
   o  7: 'D'
@@ -157,7 +157,7 @@ Rebasing B onto H using detach (same as 
   rebasing 1:42ccdea3bb16 "B"
   rebasing 2:5fddd98957c8 "C"
   rebasing 3:32af7686d403 "D"
-  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/42ccdea3bb16-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/42ccdea3bb16-23acd8ba-backup.hg (glob)
 
   $ hg tglog
   o  7: 'D'
@@ -215,7 +215,7 @@ Rebasing C onto H detaching from B and c
   note: rebase of 2:5fddd98957c8 created no changes to commit
   rebasing 3:32af7686d403 "D"
   note: rebase of 3:32af7686d403 created no changes to commit
-  saved backup bundle to $TESTTMP/a4/.hg/strip-backup/5fddd98957c8-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a4/.hg/strip-backup/5fddd98957c8-c954f3af-backup.hg (glob)
 
   $ hg  log -G --template "{rev}:{phase} '{desc}' {branches}\n"
   o  6:secret 'Collapsed revision
@@ -277,7 +277,7 @@ Rebasing across null as ancestor
   rebasing 1:42ccdea3bb16 "B"
   rebasing 2:5fddd98957c8 "C"
   rebasing 3:32af7686d403 "D"
-  saved backup bundle to $TESTTMP/a5/.hg/strip-backup/42ccdea3bb16-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a5/.hg/strip-backup/42ccdea3bb16-23acd8ba-backup.hg (glob)
 
   $ hg tglog
   o  8: 'D'
@@ -302,7 +302,7 @@ Rebasing across null as ancestor
   $ hg rebase -d 5 -s 7
   rebasing 7:13547172c9c0 "C"
   rebasing 8:4e27a76c371a "D" (tip)
-  saved backup bundle to $TESTTMP/a5/.hg/strip-backup/13547172c9c0-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a5/.hg/strip-backup/13547172c9c0-35685ded-backup.hg (glob)
   $ hg tglog
   o  8: 'D'
   |
@@ -346,7 +346,7 @@ Verify that target is not selected as ex
   note: rebase of 9:5d7b11f5fb97 created no changes to commit
   rebasing 10:9427d4d5af81 "J" (tip)
   note: rebase of 10:9427d4d5af81 created no changes to commit
-  saved backup bundle to $TESTTMP/a6/.hg/strip-backup/9790e768172d-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a6/.hg/strip-backup/9790e768172d-c9cd2a66-backup.hg (glob)
 
   $ hg tglog
   @  8: 'Collapsed revision
@@ -400,7 +400,7 @@ Ensure --continue restores a correct sta
   $ hg rebase -c
   rebasing 8:6215fafa5447 "H2" (tip)
   note: rebase of 8:6215fafa5447 created no changes to commit
-  saved backup bundle to $TESTTMP/a7/.hg/strip-backup/6215fafa5447-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a7/.hg/strip-backup/6215fafa5447-5804ebd5-backup.hg (glob)
   $ hg  log -G --template "{rev}:{phase} '{desc}' {branches}\n"
   @  7:draft 'H'
   |
diff --git a/tests/test-rebase-issue-noparam-single-rev.t b/tests/test-rebase-issue-noparam-single-rev.t
--- a/tests/test-rebase-issue-noparam-single-rev.t
+++ b/tests/test-rebase-issue-noparam-single-rev.t
@@ -53,7 +53,7 @@ Rebase with no arguments - single revisi
 
   $ hg rebase
   rebasing 2:87c180a611f2 "l1"
-  saved backup bundle to $TESTTMP/a/.hg/strip-backup/87c180a611f2-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a/.hg/strip-backup/87c180a611f2-a5be192d-backup.hg (glob)
 
   $ hg tglog
   @  4: 'l1'
@@ -113,7 +113,7 @@ Rebase with no arguments - single revisi
   $ hg rebase
   rebasing 2:87c180a611f2 "l1"
   rebasing 3:1ac923b736ef "l2"
-  saved backup bundle to $TESTTMP/b/.hg/strip-backup/87c180a611f2-backup.hg (glob)
+  saved backup bundle to $TESTTMP/b/.hg/strip-backup/87c180a611f2-5097562c-backup.hg (glob)
 
   $ hg tglog
   @  4: 'l2'
diff --git a/tests/test-rebase-mq-skip.t b/tests/test-rebase-mq-skip.t
--- a/tests/test-rebase-mq-skip.t
+++ b/tests/test-rebase-mq-skip.t
@@ -72,7 +72,7 @@ already has one local mq patch
        284 (manifests)
        109  p0
        109  p1
-  saved backup bundle to $TESTTMP/a/.hg/strip-backup/13a46ce44f60-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a/.hg/strip-backup/13a46ce44f60-5da6ecfb-backup.hg (glob)
   2 changesets found
   uncompressed size of bundle content:
        399 (changelog)
@@ -163,7 +163,7 @@ already has one local mq patch
   rebasing 5:681a378595ba "r5" (5.diff)
   rebasing 6:512a1f24768b "r6" (6.diff qtip)
   note: rebase of 6:512a1f24768b created no changes to commit
-  saved backup bundle to $TESTTMP/b/.hg/strip-backup/b4bffa6e4776-backup.hg (glob)
+  saved backup bundle to $TESTTMP/b/.hg/strip-backup/b4bffa6e4776-07dfcc80-backup.hg (glob)
 
   $ hg tglog
   @  8: 'r5' tags: 5.diff qtip tip
diff --git a/tests/test-rebase-mq.t b/tests/test-rebase-mq.t
--- a/tests/test-rebase-mq.t
+++ b/tests/test-rebase-mq.t
@@ -88,7 +88,7 @@ Fix the 2nd conflict:
   $ hg rebase -c
   already rebased 2:3504f44bffc0 "P0" (f.patch qbase) as ebe9914c0d1c
   rebasing 3:929394423cd3 "P1" (f2.patch qtip)
-  saved backup bundle to $TESTTMP/a/.hg/strip-backup/3504f44bffc0-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a/.hg/strip-backup/3504f44bffc0-30595b40-backup.hg (glob)
 
   $ hg tglog
   @  3: 'P1' tags: f2.patch qtip tip
@@ -205,7 +205,7 @@ Rebase the applied mq patches:
   $ hg rebase -s 2 -d 1
   rebasing 2:0c587ffcb480 "P0 (git)" (f_git.patch qbase)
   rebasing 3:c7f18665e4bc "P1" (f.patch qtip tip)
-  saved backup bundle to $TESTTMP/a/.hg/strip-backup/0c587ffcb480-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a/.hg/strip-backup/0c587ffcb480-0ea5695f-backup.hg (glob)
 
   $ hg qci -m 'save patch state'
 
diff --git a/tests/test-rebase-named-branches.t b/tests/test-rebase-named-branches.t
--- a/tests/test-rebase-named-branches.t
+++ b/tests/test-rebase-named-branches.t
@@ -73,7 +73,7 @@ Branch name containing a dash (issue3181
   rebasing 6:eea13746799a "G"
   rebasing 7:02de42196ebe "H"
   rebasing 9:cb039b7cae8e "dev-two named branch" (tip)
-  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/24b6387c8c8c-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/24b6387c8c8c-a5b62c90-backup.hg (glob)
 
   $ hg tglog
   @  9: 'dev-two named branch' dev-two
@@ -103,7 +103,7 @@ Branch name containing a dash (issue3181
   rebasing 7:4b988a958030 "G"
   rebasing 8:31d0e4ba75e6 "H"
   rebasing 9:9e70cd31750f "dev-two named branch" (tip)
-  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/643fc9128048-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/643fc9128048-852cc7e7-backup.hg (glob)
 
   $ hg tglog
   @  8: 'dev-two named branch' dev-two
@@ -157,7 +157,7 @@ Branch name containing a dash (issue3181
   rebasing 6:63b4f9c788a1 "G"
   rebasing 7:87861e68abd3 "H"
   rebasing 8:ec00d4e0efca "dev-two named branch"
-  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/77854864208c-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/77854864208c-b76ec1b6-backup.hg (glob)
 
   $ hg tglog
   o  9: 'dev-two named branch' dev-two
@@ -187,7 +187,7 @@ Branch name containing a dash (issue3181
   rebasing 7:471695f5257d "G"
   rebasing 8:8382a539a2df "H"
   rebasing 9:11f718458b32 "dev-two named branch" (tip)
-  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/643fc9128048-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/643fc9128048-54df85e6-backup.hg (glob)
 
   $ hg tglog
   o  8: 'dev-two named branch' dev-two
@@ -215,7 +215,7 @@ Rebasing descendant onto ancestor across
   rebasing 1:42ccdea3bb16 "B"
   rebasing 2:5fddd98957c8 "C"
   rebasing 3:32af7686d403 "D"
-  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-23acd8ba-backup.hg (glob)
 
   $ hg tglog
   o  8: 'D'
@@ -245,7 +245,7 @@ Rebasing descendant onto ancestor across
   rebasing 6:580fcd9fd48f "B"
   rebasing 7:32aba0402ed2 "C"
   rebasing 8:e4787b575338 "D" (tip)
-  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/32d3b0de7f37-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/32d3b0de7f37-08466cc6-backup.hg (glob)
 
   $ hg tglog
   o  8: 'D'
@@ -280,7 +280,7 @@ Reopen branch by rebase
   rebasing 6:81e55225e95d "B"
   rebasing 7:09eda3dc3195 "C"
   rebasing 8:31298fc9d159 "D"
-  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/86693275b2ef-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/86693275b2ef-d13f0588-backup.hg (glob)
 
   $ cd ..
 
@@ -335,7 +335,7 @@ rebase 'b1' on top of the tip of the bra
   $ hg up -qr 1
   $ hg rebase
   rebasing 1:40039acb7ca5 "b1"
-  saved backup bundle to $TESTTMP/case2/.hg/strip-backup/40039acb7ca5-backup.hg (glob)
+  saved backup bundle to $TESTTMP/case2/.hg/strip-backup/40039acb7ca5-342b72d1-backup.hg (glob)
   $ hg tglog
   @  3: 'b1' b
   |
diff --git a/tests/test-rebase-newancestor.t b/tests/test-rebase-newancestor.t
--- a/tests/test-rebase-newancestor.t
+++ b/tests/test-rebase-newancestor.t
@@ -42,7 +42,7 @@
   merging a
   rebasing 2:30ae917c0e4f "C"
   merging a
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/0f4f7cb4f549-backup.hg (glob)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/0f4f7cb4f549-82b3b163-backup.hg (glob)
 
   $ hg tglog
   o  3: 'C'
@@ -134,7 +134,7 @@ Full rebase all the way back from branch
   remote changed f-default which local deleted
   use (c)hanged version or leave (d)eleted? c
   rebasing 6:9455ee510502 "dev: merge default"
-  saved backup bundle to $TESTTMP/ancestor-merge/.hg/strip-backup/1d1a643d390e-backup.hg (glob)
+  saved backup bundle to $TESTTMP/ancestor-merge/.hg/strip-backup/1d1a643d390e-688545dc-backup.hg (glob)
   $ hg tglog
   o  6: 'dev: merge default'
   |
@@ -161,7 +161,7 @@ Grafty cherry picking rebasing:
   remote changed f-default which local deleted
   use (c)hanged version or leave (d)eleted? c
   rebasing 6:9455ee510502 "dev: merge default"
-  saved backup bundle to $TESTTMP/ancestor-merge-2/.hg/strip-backup/ec2c14fb2984-backup.hg (glob)
+  saved backup bundle to $TESTTMP/ancestor-merge-2/.hg/strip-backup/ec2c14fb2984-f6d70cf7-backup.hg (glob)
   $ hg tglog
   o  7: 'dev: merge default'
   |
@@ -233,7 +233,7 @@ Test order of parents of rebased merged 
   
   $ hg rebase -r 4 -d 2
   rebasing 4:6990226659be "merge p1 3=outside p2 1=ancestor"
-  saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/6990226659be-backup.hg (glob)
+  saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/6990226659be-4d67a0d3-backup.hg (glob)
   $ hg tip
   changeset:   5:cca50676b1c5
   tag:         tip
@@ -245,7 +245,7 @@ Test order of parents of rebased merged 
   
   $ hg rebase -r 4 -d 2
   rebasing 4:a57575f79074 "merge p1 1=ancestor p2 3=outside"
-  saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/a57575f79074-backup.hg (glob)
+  saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/a57575f79074-385426e5-backup.hg (glob)
   $ hg tip
   changeset:   5:f9daf77ffe76
   tag:         tip
@@ -301,7 +301,7 @@ rebase of merge of ancestors
        193 (changelog)
        196 (manifests)
        162  other
-  saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/4c5f12f25ebe-backup.hg (glob)
+  saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/4c5f12f25ebe-f46990e5-backup.hg (glob)
   1 changesets found
   uncompressed size of bundle content:
        252 (changelog)
diff --git a/tests/test-rebase-parameters.t b/tests/test-rebase-parameters.t
--- a/tests/test-rebase-parameters.t
+++ b/tests/test-rebase-parameters.t
@@ -123,7 +123,7 @@ Rebase with no arguments (from 3 onto 8)
   rebasing 1:42ccdea3bb16 "B"
   rebasing 2:5fddd98957c8 "C"
   rebasing 3:32af7686d403 "D"
-  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-23acd8ba-backup.hg (glob)
 
   $ hg tglog
   @  8: 'D'
@@ -161,7 +161,7 @@ Rebase with base == '.' => same as no ar
   rebasing 1:42ccdea3bb16 "B"
   rebasing 2:5fddd98957c8 "C"
   rebasing 3:32af7686d403 "D"
-  saved backup bundle to $TESTTMP/a2/.hg/strip-backup/42ccdea3bb16-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a2/.hg/strip-backup/42ccdea3bb16-23acd8ba-backup.hg (glob)
 
   $ hg tglog
   @  8: 'D'
@@ -194,7 +194,7 @@ Rebase with dest == branch(.) => same as
   rebasing 1:42ccdea3bb16 "B"
   rebasing 2:5fddd98957c8 "C"
   rebasing 3:32af7686d403 "D"
-  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/42ccdea3bb16-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/42ccdea3bb16-23acd8ba-backup.hg (glob)
 
   $ hg tglog
   @  8: 'D'
@@ -226,7 +226,7 @@ Specify only source (from 2 onto 8):
   $ hg rebase --source 'desc("C")'
   rebasing 2:5fddd98957c8 "C"
   rebasing 3:32af7686d403 "D"
-  saved backup bundle to $TESTTMP/a4/.hg/strip-backup/5fddd98957c8-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a4/.hg/strip-backup/5fddd98957c8-c954f3af-backup.hg (glob)
 
   $ hg tglog
   o  8: 'D'
@@ -259,7 +259,7 @@ Specify only dest (from 3 onto 6):
   rebasing 1:42ccdea3bb16 "B"
   rebasing 2:5fddd98957c8 "C"
   rebasing 3:32af7686d403 "D"
-  saved backup bundle to $TESTTMP/a5/.hg/strip-backup/42ccdea3bb16-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a5/.hg/strip-backup/42ccdea3bb16-23acd8ba-backup.hg (glob)
 
   $ hg tglog
   @  8: 'D'
@@ -292,7 +292,7 @@ Specify only base (from 1 onto 8):
   rebasing 1:42ccdea3bb16 "B"
   rebasing 2:5fddd98957c8 "C"
   rebasing 3:32af7686d403 "D"
-  saved backup bundle to $TESTTMP/a6/.hg/strip-backup/42ccdea3bb16-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a6/.hg/strip-backup/42ccdea3bb16-23acd8ba-backup.hg (glob)
 
   $ hg tglog
   o  8: 'D'
@@ -324,7 +324,7 @@ Specify source and dest (from 2 onto 7):
   $ hg rebase --source 2 --dest 7
   rebasing 2:5fddd98957c8 "C"
   rebasing 3:32af7686d403 "D"
-  saved backup bundle to $TESTTMP/a7/.hg/strip-backup/5fddd98957c8-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a7/.hg/strip-backup/5fddd98957c8-c954f3af-backup.hg (glob)
 
   $ hg tglog
   o  8: 'D'
@@ -357,7 +357,7 @@ Specify base and dest (from 1 onto 7):
   rebasing 1:42ccdea3bb16 "B"
   rebasing 2:5fddd98957c8 "C"
   rebasing 3:32af7686d403 "D"
-  saved backup bundle to $TESTTMP/a8/.hg/strip-backup/42ccdea3bb16-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a8/.hg/strip-backup/42ccdea3bb16-23acd8ba-backup.hg (glob)
 
   $ hg tglog
   o  8: 'D'
@@ -389,7 +389,7 @@ Specify only revs (from 2 onto 8)
   $ hg rebase --rev 'desc("C")::'
   rebasing 2:5fddd98957c8 "C"
   rebasing 3:32af7686d403 "D"
-  saved backup bundle to $TESTTMP/a9/.hg/strip-backup/5fddd98957c8-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a9/.hg/strip-backup/5fddd98957c8-c954f3af-backup.hg (glob)
 
   $ hg tglog
   o  8: 'D'
@@ -439,7 +439,7 @@ Test --tool parameter:
   $ hg rebase -s 2 -d 1 --tool internal:local
   rebasing 2:e4e3f3546619 "c2b" (tip)
   note: rebase of 2:e4e3f3546619 created no changes to commit
-  saved backup bundle to $TESTTMP/b1/.hg/strip-backup/e4e3f3546619-backup.hg (glob)
+  saved backup bundle to $TESTTMP/b1/.hg/strip-backup/e4e3f3546619-b0841178-backup.hg (glob)
 
   $ hg cat c2
   c2
@@ -452,7 +452,7 @@ Test --tool parameter:
 
   $ hg rebase -s 2 -d 1 --tool internal:other
   rebasing 2:e4e3f3546619 "c2b" (tip)
-  saved backup bundle to $TESTTMP/b2/.hg/strip-backup/e4e3f3546619-backup.hg (glob)
+  saved backup bundle to $TESTTMP/b2/.hg/strip-backup/e4e3f3546619-b0841178-backup.hg (glob)
 
   $ hg cat c2
   c2b
@@ -487,7 +487,7 @@ Test --tool parameter:
   tool option will be ignored
   rebasing 2:e4e3f3546619 "c2b" (tip)
   note: rebase of 2:e4e3f3546619 created no changes to commit
-  saved backup bundle to $TESTTMP/b3/.hg/strip-backup/e4e3f3546619-backup.hg (glob)
+  saved backup bundle to $TESTTMP/b3/.hg/strip-backup/e4e3f3546619-b0841178-backup.hg (glob)
 
   $ hg rebase -i
   abort: interactive history editing is supported by the 'histedit' extension (see 'hg help histedit')
diff --git a/tests/test-rebase-pull.t b/tests/test-rebase-pull.t
--- a/tests/test-rebase-pull.t
+++ b/tests/test-rebase-pull.t
@@ -54,7 +54,7 @@ Now b has one revision to be pulled from
   adding file changes
   added 1 changesets with 1 changes to 1 files (+1 heads)
   rebasing 2:ff8d69a621f9 "L1"
-  saved backup bundle to $TESTTMP/b/.hg/strip-backup/ff8d69a621f9-backup.hg (glob)
+  saved backup bundle to $TESTTMP/b/.hg/strip-backup/ff8d69a621f9-160fa373-backup.hg (glob)
 
   $ hg tglog
   @  3: 'L1'
@@ -151,7 +151,7 @@ pull --rebase works when a specific revi
   adding file changes
   added 2 changesets with 2 changes to 2 files
   rebasing 3:ff8d69a621f9 "L1"
-  saved backup bundle to $TESTTMP/c/.hg/strip-backup/ff8d69a621f9-backup.hg (glob)
+  saved backup bundle to $TESTTMP/c/.hg/strip-backup/ff8d69a621f9-160fa373-backup.hg (glob)
   $ hg tglog
   @  5: 'L1'
   |
diff --git a/tests/test-rebase-rename.t b/tests/test-rebase-rename.t
--- a/tests/test-rebase-rename.t
+++ b/tests/test-rebase-rename.t
@@ -61,7 +61,7 @@ Rebase the revision containing the renam
 
   $ hg rebase -s 3 -d 2
   rebasing 3:73a3ee40125d "rename A" (tip)
-  saved backup bundle to $TESTTMP/a/.hg/strip-backup/73a3ee40125d-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a/.hg/strip-backup/73a3ee40125d-1d78ebcf-backup.hg (glob)
 
   $ hg tglog
   @  3: 'rename A'
@@ -152,7 +152,7 @@ Rebase the revision containing the copy:
 
   $ hg rebase -s 3 -d 2
   rebasing 3:0a8162ff18a8 "copy A" (tip)
-  saved backup bundle to $TESTTMP/b/.hg/strip-backup/0a8162ff18a8-backup.hg (glob)
+  saved backup bundle to $TESTTMP/b/.hg/strip-backup/0a8162ff18a8-dd06302a-backup.hg (glob)
 
   $ hg tglog
   @  3: 'copy A'
@@ -236,7 +236,7 @@ Test rebase across repeating renames:
 
   $ hg rebase -s 4 -d 3
   rebasing 4:b918d683b091 "Another unrelated change" (tip)
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/b918d683b091-backup.hg (glob)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/b918d683b091-3024bc57-backup.hg (glob)
 
   $ hg diff --stat -c .
    unrelated.txt |  1 +
@@ -287,7 +287,7 @@ Rebase the copies on top of the unrelate
   rebasing 1:79d255d24ad2 "File b created as copy of a and modified"
   rebasing 2:327f772bc074 "File c created as copy of b and modified"
   rebasing 3:421b7e82bb85 "File d created as copy of c and modified"
-  saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/79d255d24ad2-backup.hg (glob)
+  saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/79d255d24ad2-4371e560-backup.hg (glob)
   $ hg update 4
   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
@@ -317,7 +317,7 @@ copy records collapse correctly.
   rebasing 4:dbb9ba033561 "File d created as copy of c and modified"
   merging c and d to d
   note: rebase of 4:dbb9ba033561 created no changes to commit
-  saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/68bf06433839-backup.hg (glob)
+  saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/68bf06433839-dde37595-backup.hg (glob)
   $ hg co tip
   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
diff --git a/tests/test-rebase-scenario-global.t b/tests/test-rebase-scenario-global.t
--- a/tests/test-rebase-scenario-global.t
+++ b/tests/test-rebase-scenario-global.t
@@ -61,7 +61,7 @@ D onto H - simple rebase:
   HG: user: Nicolas Dumazet <nicdumz.commits at gmail.com>
   HG: branch 'default'
   HG: added D
-  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/32af7686d403-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/32af7686d403-6f7dface-backup.hg (glob)
 
   $ hg tglog
   o  7: 'D'
@@ -91,7 +91,7 @@ D onto F - intermediate point:
 
   $ HGEDITOR=cat hg rebase -s 3 -d 5
   rebasing 3:32af7686d403 "D"
-  saved backup bundle to $TESTTMP/a2/.hg/strip-backup/32af7686d403-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a2/.hg/strip-backup/32af7686d403-6f7dface-backup.hg (glob)
 
   $ hg tglog
   o  7: 'D'
@@ -122,7 +122,7 @@ E onto H - skip of G:
   rebasing 4:9520eea781bc "E"
   rebasing 6:eea13746799a "G"
   note: rebase of 6:eea13746799a created no changes to commit
-  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/9520eea781bc-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/9520eea781bc-fcd8edd4-backup.hg (glob)
 
   $ hg tglog
   o  6: 'E'
@@ -152,7 +152,7 @@ F onto E - rebase of a branching point (
   rebasing 6:eea13746799a "G"
   note: rebase of 6:eea13746799a created no changes to commit
   rebasing 7:02de42196ebe "H" (tip)
-  saved backup bundle to $TESTTMP/a4/.hg/strip-backup/24b6387c8c8c-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a4/.hg/strip-backup/24b6387c8c8c-7d5d8474-backup.hg (glob)
 
   $ hg tglog
   @  6: 'H'
@@ -179,7 +179,7 @@ G onto H - merged revision having a pare
 
   $ hg rebase -s 6 -d 7
   rebasing 6:eea13746799a "G"
-  saved backup bundle to $TESTTMP/a5/.hg/strip-backup/eea13746799a-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a5/.hg/strip-backup/eea13746799a-883828ed-backup.hg (glob)
 
   $ hg tglog
   o    7: 'G'
@@ -210,7 +210,7 @@ F onto B - G maintains E as parent:
   rebasing 5:24b6387c8c8c "F"
   rebasing 6:eea13746799a "G"
   rebasing 7:02de42196ebe "H" (tip)
-  saved backup bundle to $TESTTMP/a6/.hg/strip-backup/24b6387c8c8c-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a6/.hg/strip-backup/24b6387c8c8c-7d5d8474-backup.hg (glob)
 
   $ hg tglog
   @  7: 'H'
@@ -282,7 +282,7 @@ C onto A - rebase onto an ancestor:
   $ hg rebase -d 0 -s 2
   rebasing 2:5fddd98957c8 "C"
   rebasing 3:32af7686d403 "D"
-  saved backup bundle to $TESTTMP/a7/.hg/strip-backup/5fddd98957c8-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a7/.hg/strip-backup/5fddd98957c8-c954f3af-backup.hg (glob)
   $ hg tglog
   o  7: 'D'
   |
@@ -322,31 +322,31 @@ Source phase greater or equal to destina
   5
   $ hg rebase -s9 -d0
   rebasing 9:2b23e52411f4 "D" (tip)
-  saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2b23e52411f4-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2b23e52411f4-f942decf-backup.hg (glob)
   $ hg id -n # check we updated back to parent
   5
   $ hg log --template "{phase}\n" -r 9
   draft
   $ hg rebase -s9 -d1
   rebasing 9:2cb10d0cfc6c "D" (tip)
-  saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2cb10d0cfc6c-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2cb10d0cfc6c-ddb0f256-backup.hg (glob)
   $ hg log --template "{phase}\n" -r 9
   draft
   $ hg phase --force --secret 9
   $ hg rebase -s9 -d0
   rebasing 9:c5b12b67163a "D" (tip)
-  saved backup bundle to $TESTTMP/a7/.hg/strip-backup/c5b12b67163a-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a7/.hg/strip-backup/c5b12b67163a-4e372053-backup.hg (glob)
   $ hg log --template "{phase}\n" -r 9
   secret
   $ hg rebase -s9 -d1
   rebasing 9:2a0524f868ac "D" (tip)
-  saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2a0524f868ac-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2a0524f868ac-cefd8574-backup.hg (glob)
   $ hg log --template "{phase}\n" -r 9
   secret
 Source phase lower than destination phase: new changeset get the phase of destination:
   $ hg rebase -s8 -d9
   rebasing 8:6d4f22462821 "C"
-  saved backup bundle to $TESTTMP/a7/.hg/strip-backup/6d4f22462821-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a7/.hg/strip-backup/6d4f22462821-3441f70b-backup.hg (glob)
   $ hg log --template "{phase}\n" -r 'rev(9)'
   secret
 
@@ -574,7 +574,7 @@ rebase on ancestor with revset
   rebasing 6:3d8a618087a7 "G"
   rebasing 7:72434a4e60b0 "H"
   rebasing 8:479ddb54a924 "I" (tip)
-  saved backup bundle to $TESTTMP/ah5/.hg/strip-backup/3d8a618087a7-backup.hg (glob)
+  saved backup bundle to $TESTTMP/ah5/.hg/strip-backup/3d8a618087a7-e3ecb688-backup.hg (glob)
   $ hg tglog
   o  8: 'I'
   |
@@ -609,7 +609,7 @@ We would expect heads are I, F if it was
   rebasing 6:3d8a618087a7 "G"
   rebasing 7:72434a4e60b0 "H"
   rebasing 8:479ddb54a924 "I" (tip)
-  saved backup bundle to $TESTTMP/ah6/.hg/strip-backup/3d8a618087a7-backup.hg (glob)
+  saved backup bundle to $TESTTMP/ah6/.hg/strip-backup/3d8a618087a7-9066018b-backup.hg (glob)
   $ hg tglog
   o  8: 'I'
   |
@@ -678,7 +678,7 @@ each root have a different common ancest
   $ hg rebase --dest 'desc(G)' --rev 'desc(K) + desc(I)'
   rebasing 8:e7ec4e813ba6 "I"
   rebasing 10:23a4ace37988 "K" (tip)
-  saved backup bundle to $TESTTMP/a8/.hg/strip-backup/23a4ace37988-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a8/.hg/strip-backup/23a4ace37988-84df1a8d-backup.hg (glob)
   $ hg log --rev 'children(desc(G))'
   changeset:   9:adb617877056
   parent:      6:eea13746799a
@@ -742,4 +742,4 @@ Test that rebase is not confused by $CWD
   $ hg rebase -b . -d 1 --traceback
   rebasing 2:779a07b1b7a0 "first source commit"
   rebasing 3:a7d6f3a00bf3 "second source with subdir" (tip)
-  saved backup bundle to $TESTTMP/cwd-vanish/.hg/strip-backup/779a07b1b7a0-backup.hg (glob)
+  saved backup bundle to $TESTTMP/cwd-vanish/.hg/strip-backup/779a07b1b7a0-853e0073-backup.hg (glob)
diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -462,7 +462,7 @@ shelve should leave dirstate clean (issu
   $ hg rebase -d 1 --config extensions.rebase=
   rebasing 2:323bfa07f744 "xyz" (tip)
   merging x
-  saved backup bundle to $TESTTMP/shelverebase/.hg/strip-backup/323bfa07f744-backup.hg (glob)
+  saved backup bundle to $TESTTMP/shelverebase/.hg/strip-backup/323bfa07f744-78114325-backup.hg (glob)
   $ hg unshelve
   unshelving change 'default'
   rebasing shelved changes
diff --git a/tests/test-strip.t b/tests/test-strip.t
--- a/tests/test-strip.t
+++ b/tests/test-strip.t
@@ -462,7 +462,7 @@ Strip adds, removes, modifies with --kee
   $ echo b > b
   $ echo d > d
   $ hg strip --keep tip
-  saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
+  saved backup bundle to $TESTTMP/test/.hg/strip-backup/57e364c8a475-4cfed93c-backup.hg (glob)
   $ hg status
   M b
   ! bar
@@ -547,3 +547,25 @@ Make sure no one adds back a -b option:
   
   (use "hg strip -h" to show more help)
   [255]
+
+  $ cd ..
+
+Verify bundles don't get overwritten:
+
+  $ hg init doublebundle
+  $ cd doublebundle
+  $ touch a
+  $ hg commit -Aqm a
+  $ touch b
+  $ hg commit -Aqm b
+  $ hg strip -r 0
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-1e5cfc1b-backup.hg (glob)
+  $ ls .hg/strip-backup
+  3903775176ed-1e5cfc1b-backup.hg
+  $ hg pull -q -r 3903775176ed .hg/strip-backup/3903775176ed-1e5cfc1b-backup.hg
+  $ hg strip -r 0
+  saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-54390173-backup.hg (glob)
+  $ ls .hg/strip-backup
+  3903775176ed-1e5cfc1b-backup.hg
+  3903775176ed-54390173-backup.hg


More information about the Mercurial-devel mailing list