shelve: use cg?unpacker.apply() instead of changegroup.addchangegroup()
authorAugie Fackler <augie@google.com>
Tue, 13 Oct 2015 17:11:18 -0400
changeset 26697 008761affe3f
parent 26696 78aa4392c261
child 26698 c94cdeeb586a
shelve: use cg?unpacker.apply() instead of changegroup.addchangegroup()
hgext/shelve.py
--- a/hgext/shelve.py	Tue Oct 13 17:14:21 2015 -0400
+++ b/hgext/shelve.py	Tue Oct 13 17:11:18 2015 -0400
@@ -96,9 +96,9 @@
         fp = self.opener()
         try:
             gen = exchange.readbundle(self.repo.ui, fp, self.fname, self.vfs)
-            changegroup.addchangegroup(self.repo, gen, 'unshelve',
-                                       'bundle:' + self.vfs.join(self.fname),
-                                       targetphase=phases.secret)
+            gen.apply(self.repo, 'unshelve',
+                      'bundle:' + self.vfs.join(self.fname),
+                      targetphase=phases.secret)
         finally:
             fp.close()