Show More
@@ -185,13 +185,15 b' def findcommonoutgoing(repo, other, only' | |||||
185 | def _headssummary(pushop): |
|
185 | def _headssummary(pushop): | |
186 | """compute a summary of branch and heads status before and after push |
|
186 | """compute a summary of branch and heads status before and after push | |
187 |
|
187 | |||
188 |
return {'branch': ([remoteheads], [newheads], |
|
188 | return {'branch': ([remoteheads], [newheads], | |
|
189 | [unsyncedheads], [discardedheads])} mapping | |||
189 |
|
190 | |||
190 | - branch: the branch name |
|
191 | - branch: the branch name, | |
191 | - remoteheads: the list of remote heads known locally |
|
192 | - remoteheads: the list of remote heads known locally | |
192 | None if the branch is new |
|
193 | None if the branch is new, | |
193 | - newheads: the new remote heads (known locally) with outgoing pushed |
|
194 | - newheads: the new remote heads (known locally) with outgoing pushed, | |
194 |
- unsyncedheads: the list of remote heads unknown locally |
|
195 | - unsyncedheads: the list of remote heads unknown locally, | |
|
196 | - discardedheads: the list of heads made obsolete by the push. | |||
195 | """ |
|
197 | """ | |
196 | repo = pushop.repo.unfiltered() |
|
198 | repo = pushop.repo.unfiltered() | |
197 | remote = pushop.remote |
|
199 | remote = pushop.remote | |
@@ -242,6 +244,8 b' def _headssummary(pushop):' | |||||
242 | for l in items: |
|
244 | for l in items: | |
243 | if l is not None: |
|
245 | if l is not None: | |
244 | l.sort() |
|
246 | l.sort() | |
|
247 | headssum[branch] = items + ([],) | |||
|
248 | ||||
245 | # If there are no obsstore, no post processing are needed. |
|
249 | # If there are no obsstore, no post processing are needed. | |
246 | if repo.obsstore: |
|
250 | if repo.obsstore: | |
247 | allmissing = set(outgoing.missing) |
|
251 | allmissing = set(outgoing.missing) | |
@@ -249,10 +253,10 b' def _headssummary(pushop):' | |||||
249 | allfuturecommon = set(c.node() for c in cctx) |
|
253 | allfuturecommon = set(c.node() for c in cctx) | |
250 | allfuturecommon.update(allmissing) |
|
254 | allfuturecommon.update(allmissing) | |
251 | for branch, heads in sorted(headssum.iteritems()): |
|
255 | for branch, heads in sorted(headssum.iteritems()): | |
252 | remoteheads, newheads, unsyncedheads = heads |
|
256 | remoteheads, newheads, unsyncedheads, placeholder = heads | |
253 | result = _postprocessobsolete(pushop, allfuturecommon, newheads) |
|
257 | result = _postprocessobsolete(pushop, allfuturecommon, newheads) | |
254 |
|
|
258 | headssum[branch] = (remoteheads, sorted(result[0]), unsyncedheads, | |
255 | headssum[branch] = (remoteheads, newheads, unsyncedheads) |
|
259 | sorted(result[1])) | |
256 | return headssum |
|
260 | return headssum | |
257 |
|
261 | |||
258 | def _oldheadssummary(repo, remoteheads, outgoing, inc=False): |
|
262 | def _oldheadssummary(repo, remoteheads, outgoing, inc=False): | |
@@ -275,7 +279,7 b' def _oldheadssummary(repo, remoteheads, ' | |||||
275 | unsynced = [None] |
|
279 | unsynced = [None] | |
276 | else: |
|
280 | else: | |
277 | unsynced = [] |
|
281 | unsynced = [] | |
278 | return {None: (oldheads, newheads, unsynced)} |
|
282 | return {None: (oldheads, newheads, unsynced, [])} | |
279 |
|
283 | |||
280 | def _nowarnheads(pushop): |
|
284 | def _nowarnheads(pushop): | |
281 | # Compute newly pushed bookmarks. We don't warn about bookmarked heads. |
|
285 | # Compute newly pushed bookmarks. We don't warn about bookmarked heads. | |
@@ -346,7 +350,7 b' def checkheads(pushop):' | |||||
346 | # error message, depending on unsynced status, is displayed. |
|
350 | # error message, depending on unsynced status, is displayed. | |
347 | errormsg = None |
|
351 | errormsg = None | |
348 | for branch, heads in sorted(headssum.iteritems()): |
|
352 | for branch, heads in sorted(headssum.iteritems()): | |
349 | remoteheads, newheads, unsyncedheads = heads |
|
353 | remoteheads, newheads, unsyncedheads, discardedheads = heads | |
350 | # add unsynced data |
|
354 | # add unsynced data | |
351 | if remoteheads is None: |
|
355 | if remoteheads is None: | |
352 | oldhs = set() |
|
356 | oldhs = set() |
General Comments 0
You need to be logged in to leave comments.
Login now