Show More
@@ -174,18 +174,17 b' def findcommonincoming(repo, remote, bas' | |||
|
174 | 174 | |
|
175 | 175 | return base.keys(), list(fetch), heads |
|
176 | 176 | |
|
177 | def findoutgoing(repo, remote, base=None, heads=None, force=False): | |
|
177 | def findoutgoing(repo, remote, base=None, remoteheads=None, force=False): | |
|
178 | 178 | """Return list of nodes that are roots of subsets not in remote |
|
179 | 179 | |
|
180 | 180 | If base dict is specified, assume that these nodes and their parents |
|
181 | 181 | exist on the remote side. |
|
182 | If a list of heads is specified, return only nodes which are heads | |
|
183 | or ancestors of these heads, and return a second element which | |
|
184 | contains all remote heads which get new children. | |
|
182 | If remotehead is specified, assume it is the list of the heads from | |
|
183 | the remote repository. | |
|
185 | 184 | """ |
|
186 | 185 | if base is None: |
|
187 | 186 | base = {} |
|
188 | findincoming(repo, remote, base, heads, force=force) | |
|
187 | findincoming(repo, remote, base, remoteheads, force=force) | |
|
189 | 188 | |
|
190 | 189 | repo.ui.debug("common changesets up to " |
|
191 | 190 | + " ".join(map(short, base.keys())) + "\n") |
@@ -205,22 +204,12 b' def findoutgoing(repo, remote, base=None' | |||
|
205 | 204 | # find every node whose parents have been pruned |
|
206 | 205 | subset = [] |
|
207 | 206 | # find every remote head that will get new children |
|
208 | updated_heads = set() | |
|
209 | 207 | for n in remain: |
|
210 | 208 | p1, p2 = repo.changelog.parents(n) |
|
211 | 209 | if p1 not in remain and p2 not in remain: |
|
212 | 210 | subset.append(n) |
|
213 | if heads: | |
|
214 | if p1 in heads: | |
|
215 | updated_heads.add(p1) | |
|
216 | if p2 in heads: | |
|
217 | updated_heads.add(p2) | |
|
218 | 211 | |
|
219 | # this is the set of all roots we have to push | |
|
220 | if heads: | |
|
221 | return subset, list(updated_heads) | |
|
222 | else: | |
|
223 | return subset | |
|
212 | return subset | |
|
224 | 213 | |
|
225 | 214 | def prepush(repo, remote, force, revs, newbranch): |
|
226 | 215 | '''Analyze the local and remote repositories and determine which |
@@ -241,7 +230,7 b' def prepush(repo, remote, force, revs, n' | |||
|
241 | 230 | inc = findincoming(repo, remote, common, remote_heads, force=force) |
|
242 | 231 | |
|
243 | 232 | cl = repo.changelog |
|
244 |
update |
|
|
233 | update = findoutgoing(repo, remote, common, remote_heads) | |
|
245 | 234 | outg, bases, heads = cl.nodesbetween(update, revs) |
|
246 | 235 | |
|
247 | 236 | if not bases: |
General Comments 0
You need to be logged in to leave comments.
Login now