Skip to content
Snippets Groups Projects
  • Durham Goode's avatar
    aa4a1672
    bundles: do not overwrite existing backup bundles (BC) · aa4a1672
    Durham Goode authored
    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
    aa4a1672
    History
    bundles: do not overwrite existing backup bundles (BC)
    Durham Goode authored
    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