diff --git a/mercurial/repair.py b/mercurial/repair.py --- a/mercurial/repair.py +++ b/mercurial/repair.py @@ -38,13 +38,17 @@ def _bundle(repo, bases, heads, node, su totalhash = util.sha1(''.join(allhashes)).hexdigest() name = "%s/%s-%s-%s.hg" % (backupdir, short(node), totalhash[:8], suffix) + comp = None if cgversion != '01': bundletype = "HG20" + if compress: + comp = 'BZ' elif compress: bundletype = "HG10BZ" else: bundletype = "HG10UN" - return changegroup.writebundle(repo.ui, cg, name, bundletype, vfs) + return changegroup.writebundle(repo.ui, cg, name, bundletype, vfs, + compression=comp) def _collectfiles(repo, striprev): """find out the filelogs affected by the strip""" diff --git a/tests/test-generaldelta.t b/tests/test-generaldelta.t --- a/tests/test-generaldelta.t +++ b/tests/test-generaldelta.t @@ -107,7 +107,7 @@ Test that strip bundle use bundle2 0 files updated, 0 files merged, 5 files removed, 0 files unresolved saved backup bundle to $TESTTMP/aggressive/.hg/strip-backup/1c5d4dc9a8b8-6c68e60c-backup.hg (glob) $ hg debugbundle .hg/strip-backup/* - Stream params: {} + Stream params: {'Compression': 'BZ'} changegroup -- "{'version': '02'}" 1c5d4dc9a8b8d6e1750966d343e94db665e7a1e9