242 |
242 |
243 # 1-4b. old servers: Check for new topological heads. |
243 # 1-4b. old servers: Check for new topological heads. |
244 # Construct {old,new}map with branch = None (topological branch). |
244 # Construct {old,new}map with branch = None (topological branch). |
245 # (code based on update) |
245 # (code based on update) |
246 knownnode = repo.changelog.hasnode # no nodemap until it is filtered |
246 knownnode = repo.changelog.hasnode # no nodemap until it is filtered |
247 oldheads = set(h for h in remoteheads if knownnode(h)) |
247 oldheads = list(h for h in remoteheads if knownnode(h)) |
248 # all nodes in outgoing.missing are children of either: |
248 # all nodes in outgoing.missing are children of either: |
249 # - an element of oldheads |
249 # - an element of oldheads |
250 # - another element of outgoing.missing |
250 # - another element of outgoing.missing |
251 # - nullrev |
251 # - nullrev |
252 # This explains why the new head are very simple to compute. |
252 # This explains why the new head are very simple to compute. |
253 r = repo.set('heads(%ln + %ln)', oldheads, outgoing.missing) |
253 r = repo.set('heads(%ln + %ln)', oldheads, outgoing.missing) |
254 newheads = list(c.node() for c in r) |
254 newheads = list(c.node() for c in r) |
255 # set some unsynced head to issue the "unsynced changes" warning |
255 # set some unsynced head to issue the "unsynced changes" warning |
256 if inc: |
256 if inc: |
257 unsynced = {None} |
257 unsynced = [None] |
258 else: |
258 else: |
259 unsynced = set() |
259 unsynced = [] |
260 return {None: (oldheads, newheads, unsynced)} |
260 return {None: (oldheads, newheads, unsynced)} |
261 |
261 |
262 def _nowarnheads(pushop): |
262 def _nowarnheads(pushop): |
263 # Compute newly pushed bookmarks. We don't warn about bookmarked heads. |
263 # Compute newly pushed bookmarks. We don't warn about bookmarked heads. |
264 repo = pushop.repo.unfiltered() |
264 repo = pushop.repo.unfiltered() |