Show More
@@ -1317,8 +1317,8 b' def _newhistedit(ui, repo, state, revs, ' | |||||
1317 | # Create a backup so we can always abort completely. |
|
1317 | # Create a backup so we can always abort completely. | |
1318 | backupfile = None |
|
1318 | backupfile = None | |
1319 | if not obsolete.isenabled(repo, obsolete.createmarkersopt): |
|
1319 | if not obsolete.isenabled(repo, obsolete.createmarkersopt): | |
1320 |
backupfile = repair. |
|
1320 | backupfile = repair.backupbundle(repo, [parentctxnode], | |
1321 | 'histedit') |
|
1321 | [topmost], root, 'histedit') | |
1322 | state.backupfile = backupfile |
|
1322 | state.backupfile = backupfile | |
1323 |
|
1323 | |||
1324 | def _getsummary(ctx): |
|
1324 | def _getsummary(ctx): |
@@ -27,7 +27,8 b' from . import (' | |||||
27 | util, |
|
27 | util, | |
28 | ) |
|
28 | ) | |
29 |
|
29 | |||
30 |
def |
|
30 | def backupbundle(repo, bases, heads, node, suffix, compress=True, | |
|
31 | obsolescence=True): | |||
31 | """create a bundle with the specified revisions as a backup""" |
|
32 | """create a bundle with the specified revisions as a backup""" | |
32 |
|
33 | |||
33 | backupdir = "strip-backup" |
|
34 | backupdir = "strip-backup" | |
@@ -166,7 +167,7 b' def strip(ui, repo, nodelist, backup=Tru' | |||||
166 | vfs = repo.vfs |
|
167 | vfs = repo.vfs | |
167 | node = nodelist[-1] |
|
168 | node = nodelist[-1] | |
168 | if backup: |
|
169 | if backup: | |
169 |
backupfile = |
|
170 | backupfile = backupbundle(repo, stripbases, cl.heads(), node, topic) | |
170 | repo.ui.status(_("saved backup bundle to %s\n") % |
|
171 | repo.ui.status(_("saved backup bundle to %s\n") % | |
171 | vfs.join(backupfile)) |
|
172 | vfs.join(backupfile)) | |
172 | repo.ui.log("backupbundle", "saved backup bundle to %s\n", |
|
173 | repo.ui.log("backupbundle", "saved backup bundle to %s\n", | |
@@ -179,7 +180,7 b' def strip(ui, repo, nodelist, backup=Tru' | |||||
179 | # we are trying to strip. This is harmless since the stripped markers |
|
180 | # we are trying to strip. This is harmless since the stripped markers | |
180 | # are already backed up and we did not touched the markers for the |
|
181 | # are already backed up and we did not touched the markers for the | |
181 | # saved changesets. |
|
182 | # saved changesets. | |
182 |
tmpbundlefile = |
|
183 | tmpbundlefile = backupbundle(repo, savebases, saveheads, node, 'temp', | |
183 | compress=False, obsolescence=False) |
|
184 | compress=False, obsolescence=False) | |
184 |
|
185 | |||
185 | try: |
|
186 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now