Patchwork [04,of,10] shelve: use cg?unpacker.apply() instead of changegroup.addchangegroup()

login
register
mail settings
Submitter Augie Fackler
Date Oct. 14, 2015, 5:34 p.m.
Message ID <0d9362f825f9b8311eef.1444844069@augie-macbookair2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/11057/
State Accepted
Headers show

Comments

Augie Fackler - Oct. 14, 2015, 5:34 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1444770678 14400
#      Tue Oct 13 17:11:18 2015 -0400
# Node ID 0d9362f825f9b8311eef81255f98c5342e2d226f
# Parent  a2cf25ebbe3d6eaa5e2dcddd355ff8384dc35028
shelve: use cg?unpacker.apply() instead of changegroup.addchangegroup()

Patch

diff --git a/hgext/shelve.py b/hgext/shelve.py
--- a/hgext/shelve.py
+++ b/hgext/shelve.py
@@ -96,9 +96,9 @@  class shelvedfile(object):
         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()