shelve: use `targetphase` while unbundling
authorPierre-Yves David <pierre-yves.david@fb.com>
Tue, 05 Aug 2014 13:51:13 -0700
changeset 22042 8d99c107b041
parent 22041 97f86ce79abe
child 22043 1274ff3f20a8
shelve: use `targetphase` while unbundling This removes the last manual phase movement in shelve.
hgext/shelve.py
--- a/hgext/shelve.py	Tue Aug 05 13:49:38 2014 -0700
+++ b/hgext/shelve.py	Tue Aug 05 13:51:13 2014 -0700
@@ -73,7 +73,8 @@
         try:
             gen = exchange.readbundle(self.repo.ui, fp, self.fname, self.vfs)
             changegroup.addchangegroup(self.repo, gen, 'unshelve',
-                                       'bundle:' + self.vfs.join(self.fname))
+                                       'bundle:' + self.vfs.join(self.fname),
+                                       targetphase=phases.secret)
         finally:
             fp.close()
 
@@ -579,8 +580,6 @@
 
         ui.quiet = True
         shelvedfile(repo, basename, 'hg').applybundle()
-        nodes = [ctx.node() for ctx in repo.set('%d:', oldtiprev)]
-        phases.retractboundary(repo, phases.secret, nodes)
 
         ui.quiet = oldquiet