Show More
@@ -68,6 +68,15 b' class shelvedfile(object):' | |||||
68 | raise |
|
68 | raise | |
69 | raise util.Abort(_("shelved change '%s' not found") % self.name) |
|
69 | raise util.Abort(_("shelved change '%s' not found") % self.name) | |
70 |
|
70 | |||
|
71 | def applybundle(self): | |||
|
72 | fp = self.opener() | |||
|
73 | try: | |||
|
74 | gen = changegroup.readbundle(fp, self.fname, self.vfs) | |||
|
75 | changegroup.addchangegroup(self.repo, gen, 'unshelve', | |||
|
76 | 'bundle:' + self.vfs.join(self.fname)) | |||
|
77 | finally: | |||
|
78 | fp.close() | |||
|
79 | ||||
71 | class shelvedstate(object): |
|
80 | class shelvedstate(object): | |
72 | """Handle persistence during unshelving operations. |
|
81 | """Handle persistence during unshelving operations. | |
73 |
|
82 | |||
@@ -560,16 +569,10 b' def unshelve(ui, repo, *shelved, **opts)' | |||||
560 | node = cmdutil.commit(ui, repo, commitfunc, [], tempopts) |
|
569 | node = cmdutil.commit(ui, repo, commitfunc, [], tempopts) | |
561 | tmpwctx = repo[node] |
|
570 | tmpwctx = repo[node] | |
562 |
|
571 | |||
563 | try: |
|
572 | ui.quiet = True | |
564 | ui.quiet = True |
|
573 | shelvedfile(repo, basename, 'hg').applybundle() | |
565 | fp = shelvedfile(repo, basename, 'hg').opener() |
|
574 | nodes = [ctx.node() for ctx in repo.set('%d:', oldtiprev)] | |
566 | gen = changegroup.readbundle(fp, fp.name) |
|
575 | phases.retractboundary(repo, phases.secret, nodes) | |
567 | changegroup.addchangegroup(repo, gen, 'unshelve', |
|
|||
568 | 'bundle:' + fp.name) |
|
|||
569 | nodes = [ctx.node() for ctx in repo.set('%d:', oldtiprev)] |
|
|||
570 | phases.retractboundary(repo, phases.secret, nodes) |
|
|||
571 | finally: |
|
|||
572 | fp.close() |
|
|||
573 |
|
576 | |||
574 | ui.quiet = oldquiet |
|
577 | ui.quiet = oldquiet | |
575 |
|
578 |
General Comments 0
You need to be logged in to leave comments.
Login now