diff hgext/shelve.py @ 34097:f7d41b85bbf6

changegroup: replace changegroupsubset with makechangegroup As part of getting rid of all the permutations of changegroup creation, let's remove changegroupsubset and call makechangegroup instead. This moves the responsibility of creating the outgoing set to the caller, but that seems like a relatively reasonable unit of functionality for the caller to have to care about (i.e. what commits should be bundled). Differential Revision: https://phab.mercurial-scm.org/D665
author Durham Goode <durham@fb.com>
date Sun, 10 Sep 2017 18:43:59 -0700
parents ec306bc6915b
children 18cd210535b3
line wrap: on
line diff
--- a/hgext/shelve.py	Sun Sep 10 18:39:02 2017 -0700
+++ b/hgext/shelve.py	Sun Sep 10 18:43:59 2017 -0700
@@ -33,6 +33,7 @@
     bundlerepo,
     changegroup,
     cmdutil,
+    discovery,
     error,
     exchange,
     hg,
@@ -145,8 +146,11 @@
             btype = 'HG20'
             compression = 'BZ'
 
-        cg = changegroup.changegroupsubset(self.repo, bases, [node], 'shelve',
-                                           version=cgversion)
+        outgoing = discovery.outgoing(self.repo, missingroots=bases,
+                                      missingheads=[node])
+        cg = changegroup.makechangegroup(self.repo, outgoing, cgversion,
+                                         'shelve')
+
         bundle2.writebundle(self.ui, cg, self.fname, btype, self.vfs,
                                 compression=compression)