changeset 23835:aa4a1672583e

bundles: do not overwrite existing backup bundles (BC) 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
author Durham Goode <durham@fb.com>
date Fri, 09 Jan 2015 10:52:14 -0800
parents bf07c19b4c82
children 3fb61fcbc4e4
files mercurial/repair.py tests/test-bookmarks-rebase.t tests/test-commit-amend.t tests/test-convert-filemap.t tests/test-convert-svn-sink.t tests/test-graft.t tests/test-hgweb-bundle.t tests/test-histedit-bookmark-motion.t tests/test-histedit-edit.t tests/test-histedit-fold.t tests/test-histedit-obsolete.t tests/test-largefiles-update.t tests/test-largefiles.t tests/test-mq.t tests/test-rebase-abort.t tests/test-rebase-bookmarks.t tests/test-rebase-cache.t tests/test-rebase-check-restore.t tests/test-rebase-collapse.t tests/test-rebase-conflicts.t tests/test-rebase-detach.t tests/test-rebase-issue-noparam-single-rev.t tests/test-rebase-mq-skip.t tests/test-rebase-mq.t tests/test-rebase-named-branches.t tests/test-rebase-newancestor.t tests/test-rebase-parameters.t tests/test-rebase-pull.t tests/test-rebase-rename.t tests/test-rebase-scenario-global.t tests/test-shelve.t tests/test-strip.t
diffstat 32 files changed, 172 insertions(+), 142 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/repair.py	Mon Jan 12 18:01:20 2015 -0700
+++ b/mercurial/repair.py	Fri Jan 09 10:52:14 2015 -0800
@@ -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,15 @@
     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)
+    allhashes = sorted(c.hex() for c in allcommits)
+    totalhash = util.sha1(''.join(allhashes)).hexdigest()
+    name = "%s/%s-%s-%s.hg" % (backupdir, short(node), totalhash[:8], suffix)
+
     if compress:
         bundletype = "HG10BZ"
     else:
--- a/tests/test-bookmarks-rebase.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-bookmarks-rebase.t	Fri Jan 09 10:52:14 2015 -0800
@@ -38,7 +38,7 @@
 
   $ 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
--- a/tests/test-commit-amend.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-commit-amend.t	Fri Jan 09 10:52:14 2015 -0800
@@ -35,7 +35,7 @@
   $ 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 @@
 
 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-7a3b3496-amend-backup.hg (glob)
 
 Remove file that was added in amended commit:
 (and test logfile option)
@@ -95,7 +95,7 @@
   $ 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-0b55739a-amend-backup.hg (glob)
 
   $ hg cat b
   b: no such file in rev 74609c7f506e
@@ -116,7 +116,7 @@
        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 @@
   > 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-83b10a27-amend-backup.hg (glob)
   $ hg log -r .
   changeset:   1:5f357c7560ab
   tag:         tip
@@ -260,7 +260,7 @@
        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 @@
        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 @@
   $ 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 @@
   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 @@
   $ 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-6701c392-amend-backup.hg (glob)
 
 Same thing, different code path:
 
@@ -398,7 +398,7 @@
   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 @@
   $ 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 @@
   $ 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 @@
   $ 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-90259f67-amend-backup.hg (glob)
   $ hg st --change . --copies
   $ hg log -r . --template "{file_copies}\n"
   
@@ -450,7 +450,7 @@
   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 @@
   $ 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 @@
   $ 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
--- a/tests/test-convert-filemap.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-convert-filemap.t	Fri Jan 09 10:52:14 2015 -0800
@@ -637,7 +637,7 @@
   $ 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
--- a/tests/test-convert-svn-sink.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-convert-svn-sink.t	Fri Jan 09 10:52:14 2015 -0800
@@ -256,7 +256,7 @@
   $ 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-ed505e42-backup.hg (glob)
 
 #endif
 
--- a/tests/test-graft.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-graft.t	Fri Jan 09 10:52:14 2015 -0800
@@ -712,7 +712,7 @@
   $ 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-d323a1e4-backup.hg (glob)
   $ hg graft tmp
   skipping already grafted revision 8:9db0f28fd374 (2:ef0ef43d49e7 also has unknown origin 5c095ad7e90f)
   [255]
--- a/tests/test-hgweb-bundle.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-hgweb-bundle.t	Fri Jan 09 10:52:14 2015 -0800
@@ -18,11 +18,11 @@
 
   $ 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
--- a/tests/test-histedit-bookmark-motion.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-histedit-bookmark-motion.t	Fri Jan 09 10:52:14 2015 -0800
@@ -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-48787b8d-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.
--- a/tests/test-histedit-edit.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-histedit-edit.t	Fri Jan 09 10:52:14 2015 -0800
@@ -170,7 +170,7 @@
   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 @@
   [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)
--- a/tests/test-histedit-fold.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-histedit-fold.t	Fri Jan 09 10:52:14 2015 -0800
@@ -387,7 +387,7 @@
   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-3d69522c-backup.hg (glob)
   $ hg logt -G
   @  1:10c647b2cdd5 +4
   |
--- a/tests/test-histedit-obsolete.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-histedit-obsolete.t	Fri Jan 09 10:52:14 2015 -0800
@@ -64,7 +64,7 @@
   > 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 @@
   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-86c99c41-backup.hg (glob)
   $ hg log -G
   @  19:f9daec13fb98 (secret) i
   |
--- a/tests/test-largefiles-update.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-largefiles-update.t	Fri Jan 09 10:52:14 2015 -0800
@@ -366,15 +366,15 @@
 
   $ 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-2e7b195d-backup.hg (glob)
+  $ mv .hg/strip-backup/9530e27857f7-2e7b195d-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-2e7b195d-backup.hg
+  pulling from $TESTTMP/9530e27857f7-2e7b195d-backup.hg (glob)
   searching for changes
   adding changesets
   adding manifests
@@ -408,7 +408,7 @@
 
   $ 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-2e7b195d-backup.hg
   adding changesets
   adding manifests
   adding file changes
--- a/tests/test-largefiles.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-largefiles.t	Fri Jan 09 10:52:14 2015 -0800
@@ -1188,7 +1188,7 @@
   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 @@
   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
--- a/tests/test-mq.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-mq.t	Fri Jan 09 10:52:14 2015 -0800
@@ -801,7 +801,7 @@
 
   $ 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 ..
 
 
--- a/tests/test-rebase-abort.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-rebase-abort.t	Fri Jan 09 10:52:14 2015 -0800
@@ -72,7 +72,7 @@
 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
--- a/tests/test-rebase-bookmarks.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-rebase-bookmarks.t	Fri Jan 09 10:52:14 2015 -0800
@@ -75,7 +75,7 @@
   
   $ 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 @@
 
   $ 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 @@
   $ 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-a687065f-backup.hg (glob)
 
   $ hg tglog
   @  3: 'C' bookmarks: Y Z
@@ -139,7 +139,7 @@
   $ 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-a687065f-backup.hg (glob)
 
   $ hg tglog
   o  3: 'C' bookmarks: Y Z
@@ -179,7 +179,7 @@
   (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 @@
   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-b4840586-backup.hg (glob)
--- a/tests/test-rebase-cache.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-rebase-cache.t	Fri Jan 09 10:52:14 2015 -0800
@@ -107,7 +107,7 @@
   $ 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-89160bff-backup.hg (glob)
 
   $ hg branches
   branch3                        8:466cdfb14b62
@@ -169,7 +169,7 @@
   
   $ 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 @@
   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-3c88de16-backup.hg (glob)
 
   $ hg branches
   branch2                        7:6b4bdc1b5ac0
@@ -273,7 +273,7 @@
 
   $ 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-11b7c407-backup.hg (glob)
 
   $ hg tglog
   o  3: 'C' branch2
@@ -334,7 +334,7 @@
 
   $ 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 @@
 
   $ 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-a687065f-backup.hg (glob)
 
   $ hg theads
   0: 'A' 
@@ -485,4 +485,4 @@
   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-35e980d0-backup.hg (glob)
--- a/tests/test-rebase-check-restore.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-rebase-check-restore.t	Fri Jan 09 10:52:14 2015 -0800
@@ -138,7 +138,7 @@
   (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
--- a/tests/test-rebase-collapse.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-rebase-collapse.t	Fri Jan 09 10:52:14 2015 -0800
@@ -81,7 +81,7 @@
   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-3cb021d3-backup.hg (glob)
 
   $ hg tglogp
   @  5:secret 'Collapsed revision
@@ -123,7 +123,7 @@
   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 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 @@
   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-75046b61-backup.hg (glob)
 
   $ hg tglog
   o    5: 'Collapsed revision
@@ -330,7 +330,7 @@
   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-75046b61-backup.hg (glob)
 
   $ cat $TESTTMP/b2/.hg/cache/branch2-served
   c65502d4178782309ce0574c5ae6ee9485a9bafa 4
@@ -438,7 +438,7 @@
   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-f95d0879-backup.hg (glob)
 
   $ hg tglog
   o    5: 'Collapsed revision
@@ -535,7 +535,7 @@
   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-9a3f7d92-backup.hg (glob)
 
   $ hg tglog
   o  2: 'Collapsed revision
@@ -621,7 +621,7 @@
   $ 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 @@
   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-ef8ef003-backup.hg (glob)
   $ hg st
   $ hg st --copies --change tip
   A d
@@ -724,7 +724,7 @@
   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 @@
 
   $ 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 @@
   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-77d3b6e2-backup.hg (glob)
   $ hg log -G --template "{rev}: '{desc}' {bookmarks}"
   @  1: 'collapsed' foo
   |
--- a/tests/test-rebase-conflicts.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-rebase-conflicts.t	Fri Jan 09 10:52:14 2015 -0800
@@ -86,7 +86,7 @@
   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 @@
   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-15f7a814-backup.hg (glob)
   3 changesets found
   list of changesets:
   4c9fbe56a16f30c0d5dcc40ec1a97bbe3325209c
--- a/tests/test-rebase-detach.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-rebase-detach.t	Fri Jan 09 10:52:14 2015 -0800
@@ -49,7 +49,7 @@
   $ 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 @@
   $ 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-f9244fa1-backup.hg (glob)
 
   $ hg tglog
   o  7: 'D'
@@ -157,7 +157,7 @@
   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-3cb021d3-backup.hg (glob)
 
   $ hg tglog
   o  7: 'D'
@@ -215,7 +215,7 @@
   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-f9244fa1-backup.hg (glob)
 
   $ hg  log -G --template "{rev}:{phase} '{desc}' {branches}\n"
   o  6:secret 'Collapsed revision
@@ -277,7 +277,7 @@
   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-3cb021d3-backup.hg (glob)
 
   $ hg tglog
   o  8: 'D'
@@ -302,7 +302,7 @@
   $ 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 @@
   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-c2111e9d-backup.hg (glob)
 
   $ hg tglog
   @  8: 'Collapsed revision
@@ -400,7 +400,7 @@
   $ 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'
   |
--- a/tests/test-rebase-issue-noparam-single-rev.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-rebase-issue-noparam-single-rev.t	Fri Jan 09 10:52:14 2015 -0800
@@ -53,7 +53,7 @@
 
   $ 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 @@
   $ 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-b980535c-backup.hg (glob)
 
   $ hg tglog
   @  4: 'l2'
--- a/tests/test-rebase-mq-skip.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-rebase-mq-skip.t	Fri Jan 09 10:52:14 2015 -0800
@@ -72,7 +72,7 @@
        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 @@
   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-b9bfb84d-backup.hg (glob)
 
   $ hg tglog
   @  8: 'r5' tags: 5.diff qtip tip
--- a/tests/test-rebase-mq.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-rebase-mq.t	Fri Jan 09 10:52:14 2015 -0800
@@ -88,7 +88,7 @@
   $ 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 @@
   $ 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'
 
--- a/tests/test-rebase-named-branches.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-rebase-named-branches.t	Fri Jan 09 10:52:14 2015 -0800
@@ -73,7 +73,7 @@
   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-24cb8001-backup.hg (glob)
 
   $ hg tglog
   @  9: 'dev-two named branch' dev-two
@@ -103,7 +103,7 @@
   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-c4ee9ef5-backup.hg (glob)
 
   $ hg tglog
   @  8: 'dev-two named branch' dev-two
@@ -157,7 +157,7 @@
   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-74d59436-backup.hg (glob)
 
   $ hg tglog
   o  9: 'dev-two named branch' dev-two
@@ -187,7 +187,7 @@
   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-177f3c5c-backup.hg (glob)
 
   $ hg tglog
   o  8: 'dev-two named branch' dev-two
@@ -215,7 +215,7 @@
   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-3cb021d3-backup.hg (glob)
 
   $ hg tglog
   o  8: 'D'
@@ -245,7 +245,7 @@
   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-c37815ca-backup.hg (glob)
 
   $ hg tglog
   o  8: 'D'
@@ -280,7 +280,7 @@
   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-f9fcf4e2-backup.hg (glob)
 
   $ cd ..
 
@@ -335,7 +335,7 @@
   $ 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
   |
--- a/tests/test-rebase-newancestor.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-rebase-newancestor.t	Fri Jan 09 10:52:14 2015 -0800
@@ -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 @@
   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-43e9e04b-backup.hg (glob)
   $ hg tglog
   o  6: 'dev: merge default'
   |
@@ -161,7 +161,7 @@
   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-62d0b222-backup.hg (glob)
   $ hg tglog
   o  7: 'dev: merge default'
   |
@@ -233,7 +233,7 @@
   
   $ 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 @@
   
   $ 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 @@
        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)
--- a/tests/test-rebase-parameters.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-rebase-parameters.t	Fri Jan 09 10:52:14 2015 -0800
@@ -123,7 +123,7 @@
   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-3cb021d3-backup.hg (glob)
 
   $ hg tglog
   @  8: 'D'
@@ -161,7 +161,7 @@
   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-3cb021d3-backup.hg (glob)
 
   $ hg tglog
   @  8: 'D'
@@ -194,7 +194,7 @@
   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-3cb021d3-backup.hg (glob)
 
   $ hg tglog
   @  8: 'D'
@@ -226,7 +226,7 @@
   $ 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-f9244fa1-backup.hg (glob)
 
   $ hg tglog
   o  8: 'D'
@@ -259,7 +259,7 @@
   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-3cb021d3-backup.hg (glob)
 
   $ hg tglog
   @  8: 'D'
@@ -292,7 +292,7 @@
   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-3cb021d3-backup.hg (glob)
 
   $ hg tglog
   o  8: 'D'
@@ -324,7 +324,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-f9244fa1-backup.hg (glob)
 
   $ hg tglog
   o  8: 'D'
@@ -357,7 +357,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-3cb021d3-backup.hg (glob)
 
   $ hg tglog
   o  8: 'D'
@@ -389,7 +389,7 @@
   $ 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-f9244fa1-backup.hg (glob)
 
   $ hg tglog
   o  8: 'D'
@@ -439,7 +439,7 @@
   $ 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 @@
 
   $ 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 @@
   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')
--- a/tests/test-rebase-pull.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-rebase-pull.t	Fri Jan 09 10:52:14 2015 -0800
@@ -54,7 +54,7 @@
   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 @@
   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'
   |
--- a/tests/test-rebase-rename.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-rebase-rename.t	Fri Jan 09 10:52:14 2015 -0800
@@ -61,7 +61,7 @@
 
   $ 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 @@
 
   $ 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 @@
 
   $ 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 @@
   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-a2265555-backup.hg (glob)
   $ hg update 4
   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
@@ -317,7 +317,7 @@
   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
 
--- a/tests/test-rebase-scenario-global.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-rebase-scenario-global.t	Fri Jan 09 10:52:14 2015 -0800
@@ -61,7 +61,7 @@
   HG: user: Nicolas Dumazet <nicdumz.commits@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 @@
 
   $ 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 @@
   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 @@
   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-c3fe765d-backup.hg (glob)
 
   $ hg tglog
   @  6: 'H'
@@ -179,7 +179,7 @@
 
   $ 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 @@
   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-c3fe765d-backup.hg (glob)
 
   $ hg tglog
   @  7: 'H'
@@ -282,7 +282,7 @@
   $ 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-f9244fa1-backup.hg (glob)
   $ hg tglog
   o  7: 'D'
   |
@@ -322,31 +322,31 @@
   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 @@
   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-b4f73f31-backup.hg (glob)
   $ hg tglog
   o  8: 'I'
   |
@@ -609,7 +609,7 @@
   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-aae93a24-backup.hg (glob)
   $ hg tglog
   o  8: 'I'
   |
@@ -678,7 +678,7 @@
   $ 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-b06984b3-backup.hg (glob)
   $ hg log --rev 'children(desc(G))'
   changeset:   9:adb617877056
   parent:      6:eea13746799a
@@ -742,4 +742,4 @@
   $ 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)
--- a/tests/test-shelve.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-shelve.t	Fri Jan 09 10:52:14 2015 -0800
@@ -462,7 +462,7 @@
   $ 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
--- a/tests/test-strip.t	Mon Jan 12 18:01:20 2015 -0700
+++ b/tests/test-strip.t	Fri Jan 09 10:52:14 2015 -0800
@@ -462,7 +462,7 @@
   $ 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 @@
   
   (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-e68910bd-backup.hg (glob)
+  $ ls .hg/strip-backup
+  3903775176ed-e68910bd-backup.hg
+  $ hg pull -q -r 3903775176ed .hg/strip-backup/3903775176ed-e68910bd-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-54390173-backup.hg
+  3903775176ed-e68910bd-backup.hg