Mercurial > public > mercurial-scm > hg-stable
diff mercurial/repair.py @ 26425:eb21b6679dc6
strip: compress bundle2 backup using BZ
Storing uncompressed bundle on disk would be a regression. Strip backup using
bundle2 are now compressed when requested.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 29 Sep 2015 14:42:03 -0700 |
parents | c93f91c1db1c |
children | 56b2bcea2529 |
line wrap: on
line diff
--- a/mercurial/repair.py Tue Sep 29 14:41:40 2015 -0700 +++ b/mercurial/repair.py Tue Sep 29 14:42:03 2015 -0700 @@ -38,13 +38,17 @@ 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"""