Mercurial > public > mercurial-scm > hg
diff tests/test-rebase-conflicts.t @ 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 | a387b0390082 |
children | 7aa1405528a3 |
line wrap: on
line diff
--- 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