[PATCH 2 of 3] changegroup: refactor outgoing logic into a function
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Wed May 7 21:46:43 CDT 2014
On 05/07/2014 06:44 PM, Durham Goode wrote:
> # HG changeset patch
> # User Durham Goode <durham at fb.com>
> # Date 1399508554 25200
> # Wed May 07 17:22:34 2014 -0700
> # Node ID d2f14d289ef0b11f96262f0b226c6c360fa8467e
> # Parent c727b16938123025ab733c7c996bec556e45860a
> changegroup: refactor outgoing logic into a function
>
> Extensions that add to bundle2 will want to know which commits are outgoing so
> they can bundle data that is appropriate to those commits. This moves the logic
> for figuring that out to a separate function so extensions can do the same
> computation.
>
> diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
> --- a/mercurial/changegroup.py
> +++ b/mercurial/changegroup.py
> @@ -493,6 +493,17 @@
> bundler = bundle10(repo, bundlecaps)
> return getsubset(repo, outgoing, bundler, source)
>
> +def getoutgoing(repo, heads, common):
This function needs:
1. a docstring (explaining its purpose and behavior),
2. a better name,
3. a leading underscore (we do not plan any official outside user yet).
Two other patches looks goods
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list