Show More
@@ -60,12 +60,12 b' def _strip(ui, repo, rev, backup="all"):' | |||
|
60 | 60 | p[pn] = 1 |
|
61 | 61 | return h |
|
62 | 62 | |
|
63 | def bundle(cg): | |
|
63 | def bundle(repo, bases, heads, rev, suffix): | |
|
64 | cg = repo.changegroupsubset(bases, heads, 'strip') | |
|
64 | 65 | backupdir = repo.join("strip-backup") |
|
65 | 66 | if not os.path.isdir(backupdir): |
|
66 | 67 | os.mkdir(backupdir) |
|
67 | name = os.path.join(backupdir, "%s" % revlog.short(rev)) | |
|
68 | name = savename(name) | |
|
68 | name = os.path.join(backupdir, "%s-%s" % (revlog.short(rev), suffix)) | |
|
69 | 69 | ui.warn("saving bundle to %s\n" % name) |
|
70 | 70 | return changegroup.writebundle(cg, name, "HG10BZ") |
|
71 | 71 | |
@@ -141,11 +141,9 b' def _strip(ui, repo, rev, backup="all"):' | |||
|
141 | 141 | |
|
142 | 142 | # create a changegroup for all the branches we need to keep |
|
143 | 143 | if backup == "all": |
|
144 |
b |
|
|
145 | bundle(backupch) | |
|
144 | bundle(repo, [rev], chlog.heads(), rev, 'backup') | |
|
146 | 145 | if saveheads: |
|
147 |
|
|
|
148 | chgrpfile = bundle(backupch) | |
|
146 | chgrpfile = bundle(repo, savebases.keys(), saveheads, rev, 'temp') | |
|
149 | 147 | |
|
150 | 148 | stripall(revnum) |
|
151 | 149 |
General Comments 0
You need to be logged in to leave comments.
Login now