diff mercurial/localrepo.py @ 34112: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 707750e5310b
children 1632999d4bed
line wrap: on
line diff
--- a/mercurial/localrepo.py	Sun Sep 10 18:39:02 2017 -0700
+++ b/mercurial/localrepo.py	Sun Sep 10 18:43:59 2017 -0700
@@ -31,6 +31,7 @@
     context,
     dirstate,
     dirstateguard,
+    discovery,
     encoding,
     error,
     exchange,
@@ -289,7 +290,9 @@
         return changegroup.changegroup(self._repo, basenodes, source)
 
     def changegroupsubset(self, bases, heads, source):
-        return changegroup.changegroupsubset(self._repo, bases, heads, source)
+        outgoing = discovery.outgoing(self._repo, missingroots=bases,
+                                      missingheads=heads)
+        return changegroup.makechangegroup(self._repo, outgoing, '01', source)
 
     # End of baselegacywirecommands interface.