##// END OF EJS Templates
strip: compress bundle2 backup using BZ...
Pierre-Yves David -
r26425:eb21b667 default
parent child Browse files
Show More
@@ -38,13 +38,17 b' def _bundle(repo, bases, heads, node, su'
38 totalhash = util.sha1(''.join(allhashes)).hexdigest()
38 totalhash = util.sha1(''.join(allhashes)).hexdigest()
39 name = "%s/%s-%s-%s.hg" % (backupdir, short(node), totalhash[:8], suffix)
39 name = "%s/%s-%s-%s.hg" % (backupdir, short(node), totalhash[:8], suffix)
40
40
41 comp = None
41 if cgversion != '01':
42 if cgversion != '01':
42 bundletype = "HG20"
43 bundletype = "HG20"
44 if compress:
45 comp = 'BZ'
43 elif compress:
46 elif compress:
44 bundletype = "HG10BZ"
47 bundletype = "HG10BZ"
45 else:
48 else:
46 bundletype = "HG10UN"
49 bundletype = "HG10UN"
47 return changegroup.writebundle(repo.ui, cg, name, bundletype, vfs)
50 return changegroup.writebundle(repo.ui, cg, name, bundletype, vfs,
51 compression=comp)
48
52
49 def _collectfiles(repo, striprev):
53 def _collectfiles(repo, striprev):
50 """find out the filelogs affected by the strip"""
54 """find out the filelogs affected by the strip"""
@@ -107,7 +107,7 b' Test that strip bundle use bundle2'
107 0 files updated, 0 files merged, 5 files removed, 0 files unresolved
107 0 files updated, 0 files merged, 5 files removed, 0 files unresolved
108 saved backup bundle to $TESTTMP/aggressive/.hg/strip-backup/1c5d4dc9a8b8-6c68e60c-backup.hg (glob)
108 saved backup bundle to $TESTTMP/aggressive/.hg/strip-backup/1c5d4dc9a8b8-6c68e60c-backup.hg (glob)
109 $ hg debugbundle .hg/strip-backup/*
109 $ hg debugbundle .hg/strip-backup/*
110 Stream params: {}
110 Stream params: {'Compression': 'BZ'}
111 changegroup -- "{'version': '02'}"
111 changegroup -- "{'version': '02'}"
112 1c5d4dc9a8b8d6e1750966d343e94db665e7a1e9
112 1c5d4dc9a8b8d6e1750966d343e94db665e7a1e9
113
113
General Comments 0
You need to be logged in to leave comments. Login now