diff mercurial/wireproto.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 6c6169f71b8d
children 1632999d4bed
line wrap: on
line diff
--- a/mercurial/wireproto.py	Sun Sep 10 18:39:02 2017 -0700
+++ b/mercurial/wireproto.py	Sun Sep 10 18:43:59 2017 -0700
@@ -21,6 +21,7 @@
 from . import (
     bundle2,
     changegroup as changegroupmod,
+    discovery,
     encoding,
     error,
     exchange,
@@ -801,7 +802,9 @@
 def changegroupsubset(repo, proto, bases, heads):
     bases = decodelist(bases)
     heads = decodelist(heads)
-    cg = changegroupmod.changegroupsubset(repo, bases, heads, 'serve')
+    outgoing = discovery.outgoing(repo, missingroots=bases,
+                                  missingheads=heads)
+    cg = changegroupmod.makechangegroup(repo, outgoing, '01', 'serve')
     return streamres(reader=cg, v1compressible=True)
 
 @wireprotocommand('debugwireargs', 'one two *')