hgext/shelve.py
changeset 26506 edecf059fda6
parent 26505 6086ddc1fdc6
child 26507 ae29cffa05db
--- a/hgext/shelve.py	Tue Sep 29 17:14:30 2015 -0700
+++ b/hgext/shelve.py	Thu Oct 01 15:09:32 2015 -0700
@@ -105,7 +105,8 @@
     def bundlerepo(self):
         return bundlerepo.bundlerepository(self.repo.baseui, self.repo.root,
                                            self.vfs.join(self.fname))
-    def writebundle(self, cg):
+    def writebundle(self, bases, node):
+        cg = changegroup.changegroupsubset(self.repo, bases, [node], 'shelve')
         changegroup.writebundle(self.ui, cg, self.fname, 'HG10BZ', self.vfs)
 
 class shelvedstate(object):
@@ -291,8 +292,7 @@
             return 1
 
         bases = list(publicancestors(repo[node]))
-        cg = changegroup.changegroupsubset(repo, bases, [node], 'shelve')
-        shelvedfile(repo, name, 'hg').writebundle(cg)
+        shelvedfile(repo, name, 'hg').writebundle(bases, node)
         cmdutil.export(repo, [node],
                        fp=shelvedfile(repo, name, 'patch').opener('wb'),
                        opts=mdiff.diffopts(git=True))