[PATCH] discovery: move code to create outgoing from roots and heads

Pierre-Yves David pierre-yves.david at ens-lyon.org
Thu Aug 4 10:49:30 EDT 2016



On 08/04/2016 07:09 AM, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc at gmail.com>
> # Date 1470287272 25200
> #      Wed Aug 03 22:07:52 2016 -0700
> # Node ID 298e109645948c54565037e7c8859f8de7b72f63
> # Parent  73ff159923c1f05899c27238409ca398342d9ae0
> discovery: move code to create outgoing from roots and heads
>
> changegroup.changegroupsubset() contained somewhat low-level code for
> constructing an "outgoing" instance from a list of roots and heads
> nodes. It feels like discovery.py is a more appropriate location for
> this code.
>
> This code can definitely be optimized, as outgoing.missing will
> recompute the set of changesets we've already discovered from
> cl.between(). But code shouldn't be refactored during a move, so
> I've simply inserted a TODO calling attention to that.

Thanks. I've pushed this (with a minor tweak)

> +def outgoingbetween(repo, roots, heads):
> +    """Compute an ``outgoing`` consisting of nodes between roots and heads.

I changed, "compute" to "create" to make it clearer that this is a 
constructor function.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list