Show More
@@ -187,7 +187,7 b' class shelvedstate(object):' | |||||
187 | wctx = nodemod.bin(fp.readline().strip()) |
|
187 | wctx = nodemod.bin(fp.readline().strip()) | |
188 | pendingctx = nodemod.bin(fp.readline().strip()) |
|
188 | pendingctx = nodemod.bin(fp.readline().strip()) | |
189 | parents = [nodemod.bin(h) for h in fp.readline().split()] |
|
189 | parents = [nodemod.bin(h) for h in fp.readline().split()] | |
190 |
nodesto |
|
190 | nodestoremove = [nodemod.bin(h) for h in fp.readline().split()] | |
191 | branchtorestore = fp.readline().strip() |
|
191 | branchtorestore = fp.readline().strip() | |
192 | keep = fp.readline().strip() == cls._keep |
|
192 | keep = fp.readline().strip() == cls._keep | |
193 | activebook = fp.readline().strip() |
|
193 | activebook = fp.readline().strip() | |
@@ -202,7 +202,7 b' class shelvedstate(object):' | |||||
202 | obj.wctx = repo[wctx] |
|
202 | obj.wctx = repo[wctx] | |
203 | obj.pendingctx = repo[pendingctx] |
|
203 | obj.pendingctx = repo[pendingctx] | |
204 | obj.parents = parents |
|
204 | obj.parents = parents | |
205 |
obj.nodesto |
|
205 | obj.nodestoremove = nodestoremove | |
206 | obj.branchtorestore = branchtorestore |
|
206 | obj.branchtorestore = branchtorestore | |
207 | obj.keep = keep |
|
207 | obj.keep = keep | |
208 | obj.activebookmark = '' |
|
208 | obj.activebookmark = '' | |
@@ -214,7 +214,7 b' class shelvedstate(object):' | |||||
214 | return obj |
|
214 | return obj | |
215 |
|
215 | |||
216 | @classmethod |
|
216 | @classmethod | |
217 |
def save(cls, repo, name, originalwctx, pendingctx, nodesto |
|
217 | def save(cls, repo, name, originalwctx, pendingctx, nodestoremove, | |
218 | branchtorestore, keep=False, activebook=''): |
|
218 | branchtorestore, keep=False, activebook=''): | |
219 | fp = repo.vfs(cls._filename, 'wb') |
|
219 | fp = repo.vfs(cls._filename, 'wb') | |
220 | fp.write('%i\n' % cls._version) |
|
220 | fp.write('%i\n' % cls._version) | |
@@ -224,7 +224,7 b' class shelvedstate(object):' | |||||
224 | fp.write('%s\n' % |
|
224 | fp.write('%s\n' % | |
225 | ' '.join([nodemod.hex(p) for p in repo.dirstate.parents()])) |
|
225 | ' '.join([nodemod.hex(p) for p in repo.dirstate.parents()])) | |
226 | fp.write('%s\n' % |
|
226 | fp.write('%s\n' % | |
227 |
' '.join([nodemod.hex(n) for n in nodesto |
|
227 | ' '.join([nodemod.hex(n) for n in nodestoremove])) | |
228 | fp.write('%s\n' % branchtorestore) |
|
228 | fp.write('%s\n' % branchtorestore) | |
229 | fp.write('%s\n' % (cls._keep if keep else cls._nokeep)) |
|
229 | fp.write('%s\n' % (cls._keep if keep else cls._nokeep)) | |
230 | fp.write('%s\n' % (activebook or cls._noactivebook)) |
|
230 | fp.write('%s\n' % (activebook or cls._noactivebook)) | |
@@ -583,7 +583,7 b' def unshelveabort(ui, repo, state, opts)' | |||||
583 | raise |
|
583 | raise | |
584 |
|
584 | |||
585 | mergefiles(ui, repo, state.wctx, state.pendingctx) |
|
585 | mergefiles(ui, repo, state.wctx, state.pendingctx) | |
586 |
repair.strip(ui, repo, state.nodesto |
|
586 | repair.strip(ui, repo, state.nodestoremove, backup=False, | |
587 | topic='shelve') |
|
587 | topic='shelve') | |
588 | finally: |
|
588 | finally: | |
589 | shelvedstate.clear(repo) |
|
589 | shelvedstate.clear(repo) | |
@@ -650,12 +650,13 b' def unshelvecontinue(ui, repo, state, op' | |||||
650 | shelvectx = state.pendingctx |
|
650 | shelvectx = state.pendingctx | |
651 | else: |
|
651 | else: | |
652 | # only strip the shelvectx if the rebase produced it |
|
652 | # only strip the shelvectx if the rebase produced it | |
653 |
state.nodesto |
|
653 | state.nodestoremove.append(shelvectx.node()) | |
654 |
|
654 | |||
655 | mergefiles(ui, repo, state.wctx, shelvectx) |
|
655 | mergefiles(ui, repo, state.wctx, shelvectx) | |
656 | restorebranch(ui, repo, state.branchtorestore) |
|
656 | restorebranch(ui, repo, state.branchtorestore) | |
657 |
|
657 | |||
658 |
repair.strip(ui, repo, state.nodesto |
|
658 | repair.strip(ui, repo, state.nodestoremove, backup=False, | |
|
659 | topic='shelve') | |||
659 | _restoreactivebookmark(repo, state.activebookmark) |
|
660 | _restoreactivebookmark(repo, state.activebookmark) | |
660 | shelvedstate.clear(repo) |
|
661 | shelvedstate.clear(repo) | |
661 | unshelvecleanup(ui, repo, state.name, opts) |
|
662 | unshelvecleanup(ui, repo, state.name, opts) | |
@@ -708,9 +709,9 b' def _rebaserestoredcommit(ui, repo, opts' | |||||
708 | except error.InterventionRequired: |
|
709 | except error.InterventionRequired: | |
709 | tr.close() |
|
710 | tr.close() | |
710 |
|
711 | |||
711 |
nodesto |
|
712 | nodestoremove = [repo.changelog.node(rev) | |
712 | for rev in xrange(oldtiprev, len(repo))] |
|
713 | for rev in xrange(oldtiprev, len(repo))] | |
713 |
shelvedstate.save(repo, basename, pctx, tmpwctx, nodesto |
|
714 | shelvedstate.save(repo, basename, pctx, tmpwctx, nodestoremove, | |
714 | branchtorestore, opts.get('keep'), activebookmark) |
|
715 | branchtorestore, opts.get('keep'), activebookmark) | |
715 |
|
716 | |||
716 | repo.vfs.rename('rebasestate', 'unshelverebasestate') |
|
717 | repo.vfs.rename('rebasestate', 'unshelverebasestate') |
General Comments 0
You need to be logged in to leave comments.
Login now