Show More
@@ -27,7 +27,7 b' from mercurial.i18n import _' | |||||
27 | from mercurial.node import nullid, nullrev, bin, hex |
|
27 | from mercurial.node import nullid, nullrev, bin, hex | |
28 | from mercurial import changegroup, cmdutil, scmutil, phases, commands |
|
28 | from mercurial import changegroup, cmdutil, scmutil, phases, commands | |
29 | from mercurial import error, hg, mdiff, merge, patch, repair, util |
|
29 | from mercurial import error, hg, mdiff, merge, patch, repair, util | |
30 | from mercurial import templatefilters, exchange, bundlerepo |
|
30 | from mercurial import templatefilters, exchange, bundlerepo, bundle2 | |
31 | from mercurial import lock as lockmod |
|
31 | from mercurial import lock as lockmod | |
32 | from hgext import rebase |
|
32 | from hgext import rebase | |
33 | import errno |
|
33 | import errno | |
@@ -96,9 +96,15 b' class shelvedfile(object):' | |||||
96 | fp = self.opener() |
|
96 | fp = self.opener() | |
97 | try: |
|
97 | try: | |
98 | gen = exchange.readbundle(self.repo.ui, fp, self.fname, self.vfs) |
|
98 | gen = exchange.readbundle(self.repo.ui, fp, self.fname, self.vfs) | |
|
99 | if not isinstance(gen, bundle2.unbundle20): | |||
99 | gen.apply(self.repo, 'unshelve', |
|
100 | gen.apply(self.repo, 'unshelve', | |
100 | 'bundle:' + self.vfs.join(self.fname), |
|
101 | 'bundle:' + self.vfs.join(self.fname), | |
101 | targetphase=phases.secret) |
|
102 | targetphase=phases.secret) | |
|
103 | if isinstance(gen, bundle2.unbundle20): | |||
|
104 | bundle2.applybundle(self.repo, gen, | |||
|
105 | self.repo.currenttransaction(), | |||
|
106 | source='unshelve', | |||
|
107 | url='bundle:' + self.vfs.join(self.fname)) | |||
102 | finally: |
|
108 | finally: | |
103 | fp.close() |
|
109 | fp.close() | |
104 |
|
110 |
General Comments 0
You need to be logged in to leave comments.
Login now