comparison mercurial/repair.py @ 11333:e83aff248c17

strip: backup bundles should use the .hg extension
author Matt Mackall <mpm@selenic.com>
date Thu, 10 Jun 2010 15:23:31 -0500
parents f974fe896921
children 76454cbc11e4
comparison
equal deleted inserted replaced
11332:716e176a4e01 11333:e83aff248c17
15 """create a bundle with the specified revisions as a backup""" 15 """create a bundle with the specified revisions as a backup"""
16 cg = repo.changegroupsubset(bases, heads, 'strip', extranodes) 16 cg = repo.changegroupsubset(bases, heads, 'strip', extranodes)
17 backupdir = repo.join("strip-backup") 17 backupdir = repo.join("strip-backup")
18 if not os.path.isdir(backupdir): 18 if not os.path.isdir(backupdir):
19 os.mkdir(backupdir) 19 os.mkdir(backupdir)
20 name = os.path.join(backupdir, "%s-%s" % (short(node), suffix)) 20 name = os.path.join(backupdir, "%s-%s.hg" % (short(node), suffix))
21 return changegroup.writebundle(cg, name, "HG10BZ") 21 return changegroup.writebundle(cg, name, "HG10BZ")
22 22
23 def _collectfiles(repo, striprev): 23 def _collectfiles(repo, striprev):
24 """find out the filelogs affected by the strip""" 24 """find out the filelogs affected by the strip"""
25 files = set() 25 files = set()