Show More
@@ -23,7 +23,7 b' from . import (' | |||||
23 | util, |
|
23 | util, | |
24 | ) |
|
24 | ) | |
25 |
|
25 | |||
26 | def _bundle(repo, bases, heads, node, suffix, compress=True): |
|
26 | def _bundle(repo, bases, heads, node, suffix, compress=True, obsolescence=True): | |
27 | """create a bundle with the specified revisions as a backup""" |
|
27 | """create a bundle with the specified revisions as a backup""" | |
28 |
|
28 | |||
29 | backupdir = "strip-backup" |
|
29 | backupdir = "strip-backup" | |
@@ -49,7 +49,7 b' def _bundle(repo, bases, heads, node, su' | |||||
49 | bundletype = "HG10UN" |
|
49 | bundletype = "HG10UN" | |
50 |
|
50 | |||
51 | outgoing = discovery.outgoing(repo, missingroots=bases, missingheads=heads) |
|
51 | outgoing = discovery.outgoing(repo, missingroots=bases, missingheads=heads) | |
52 |
contentopts = {'cg.version': cgversion, 'obsolescence': |
|
52 | contentopts = {'cg.version': cgversion, 'obsolescence': obsolescence} | |
53 | return bundle2.writenewbundle(repo.ui, repo, 'strip', name, bundletype, |
|
53 | return bundle2.writenewbundle(repo.ui, repo, 'strip', name, bundletype, | |
54 | outgoing, contentopts, vfs, compression=comp) |
|
54 | outgoing, contentopts, vfs, compression=comp) | |
55 |
|
55 | |||
@@ -150,8 +150,13 b' def strip(ui, repo, nodelist, backup=Tru' | |||||
150 | tmpbundlefile = None |
|
150 | tmpbundlefile = None | |
151 | if saveheads: |
|
151 | if saveheads: | |
152 | # do not compress temporary bundle if we remove it from disk later |
|
152 | # do not compress temporary bundle if we remove it from disk later | |
|
153 | # | |||
|
154 | # We do not include obsolescence, it might re-introduce prune markers | |||
|
155 | # we are trying to strip. This is harmless since the stripped markers | |||
|
156 | # are already backed up and we did not touched the markers for the | |||
|
157 | # saved changesets. | |||
153 | tmpbundlefile = _bundle(repo, savebases, saveheads, node, 'temp', |
|
158 | tmpbundlefile = _bundle(repo, savebases, saveheads, node, 'temp', | |
154 | compress=False) |
|
159 | compress=False, obsolescence=False) | |
155 |
|
160 | |||
156 | mfst = repo.manifestlog._revlog |
|
161 | mfst = repo.manifestlog._revlog | |
157 |
|
162 |
General Comments 0
You need to be logged in to leave comments.
Login now