Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 34115:1632999d4bed
changegroup: replace changegroup with makechangegroup
As part of reducing the number of changegroup creation APIs, let's replace the
changegroup function with makechangegroup. This pushes the responsibility of
creating the outgoing set to the caller, but that seems like a simple and
reasonable concept for the caller to be aware of.
Differential Revision: https://phab.mercurial-scm.org/D668
author | Durham Goode <durham@fb.com> |
---|---|
date | Sun, 10 Sep 2017 18:48:42 -0700 |
parents | f7d41b85bbf6 |
children | 3c9691728237 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Sun Sep 10 18:47:39 2017 -0700 +++ b/mercurial/localrepo.py Sun Sep 10 18:48:42 2017 -0700 @@ -287,7 +287,9 @@ return self._repo.branches(nodes) def changegroup(self, basenodes, source): - return changegroup.changegroup(self._repo, basenodes, source) + outgoing = discovery.outgoing(self._repo, missingroots=basenodes, + missingheads=self._repo.heads()) + return changegroup.makechangegroup(self._repo, outgoing, '01', source) def changegroupsubset(self, bases, heads, source): outgoing = discovery.outgoing(self._repo, missingroots=bases,