[PATCH 1 of 4] discovery: fix prepush documentation

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri Jan 13 15:58:14 CST 2012


# 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

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()


More information about the Mercurial-devel mailing list