[PATCH 1 of 4] discovery: fix prepush documentation

Matt Mackall mpm at selenic.com
Sun Jan 15 00:33:20 CST 2012


On Fri, 2012-01-13 at 22:58 +0100, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
> # Date 1326489361 -3600
> # Node ID c435f190d8f12ee07e6b36f0335fb167ac9e8d3a
> # Parent  c60bd481f761a279d6656d12e74680ad0f121724
> discovery: fix prepush documentation

Queued. 

Greg Ward spent a fair amount of time documenting this, curious when it
got broken.

> The prepush documentation claim that when we refuse to push, the second element
> of the returng tuple is an "outgoing" integer. value should be 0 when no
> outgoing changeset and 1 otherwise.  In pratice if there are no outgoing
> changeset, "outgoing" value is alway 1 and util.Abort is raised on other error.
> 
> the stable branch also include this error so it wasn't introduced by a recent
> refactoring.
> 
> diff --git a/mercurial/discovery.py b/mercurial/discovery.py
> --- a/mercurial/discovery.py
> +++ b/mercurial/discovery.py
> @@ -137,11 +137,9 @@
>      changesets need to be pushed to the remote. Return value depends
>      on circumstances:
>  
> -    If we are not going to push anything, return a tuple (None,
> -    outgoing, common) where outgoing is 0 if there are no outgoing
> -    changesets and 1 if there are, but we refuse to push them
> -    (e.g. would create new remote heads). The third element "common"
> -    is the list of heads of the common set between local and remote.
> +    If we are not going to push anything, return a tuple (None, 1,
> +    common) The third element "common" is the list of heads of the
> +    common set between local and remote.
>  
>      Otherwise, return a tuple (changegroup, remoteheads, futureheads),
>      where changegroup is a readable file-like object whose read()
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list