comparison mercurial/discovery.py @ 15893:eb6867b98223

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.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Fri, 13 Jan 2012 22:16:01 +0100
parents 7299e09a85a2
children 4154338f0bc0
comparison
equal deleted inserted replaced
15892:592b3d1742a1 15893:eb6867b98223
135 def prepush(repo, remote, force, revs, newbranch): 135 def prepush(repo, remote, force, revs, newbranch):
136 '''Analyze the local and remote repositories and determine which 136 '''Analyze the local and remote repositories and determine which
137 changesets need to be pushed to the remote. Return value depends 137 changesets need to be pushed to the remote. Return value depends
138 on circumstances: 138 on circumstances:
139 139
140 If we are not going to push anything, return a tuple (None, 140 If we are not going to push anything, return a tuple (None, 1,
141 outgoing, common) where outgoing is 0 if there are no outgoing 141 common) The third element "common" is the list of heads of the
142 changesets and 1 if there are, but we refuse to push them 142 common set between local and remote.
143 (e.g. would create new remote heads). The third element "common"
144 is the list of heads of the common set between local and remote.
145 143
146 Otherwise, return a tuple (changegroup, remoteheads, futureheads), 144 Otherwise, return a tuple (changegroup, remoteheads, futureheads),
147 where changegroup is a readable file-like object whose read() 145 where changegroup is a readable file-like object whose read()
148 returns successive changegroup chunks ready to be sent over the 146 returns successive changegroup chunks ready to be sent over the
149 wire, remoteheads is the list of remote heads and futureheads is 147 wire, remoteheads is the list of remote heads and futureheads is