##// END OF EJS Templates
headssummary: ensure all returned lists are sorted...
marmoute -
r32672:315d74d0 default
parent child Browse files
Show More
@@ -235,6 +235,10 b' def _headssummary(repo, remote, outgoing'
235 newmap.update(repo, (ctx.rev() for ctx in missingctx))
235 newmap.update(repo, (ctx.rev() for ctx in missingctx))
236 for branch, newheads in newmap.iteritems():
236 for branch, newheads in newmap.iteritems():
237 headssum[branch][1][:] = newheads
237 headssum[branch][1][:] = newheads
238 for branch, items in headssum.iteritems():
239 for l in items:
240 if l is not None:
241 l.sort()
238 return headssum
242 return headssum
239
243
240 def _oldheadssummary(repo, remoteheads, outgoing, inc=False):
244 def _oldheadssummary(repo, remoteheads, outgoing, inc=False):
@@ -244,14 +248,14 b' def _oldheadssummary(repo, remoteheads, '
244 # Construct {old,new}map with branch = None (topological branch).
248 # Construct {old,new}map with branch = None (topological branch).
245 # (code based on update)
249 # (code based on update)
246 knownnode = repo.changelog.hasnode # no nodemap until it is filtered
250 knownnode = repo.changelog.hasnode # no nodemap until it is filtered
247 oldheads = list(h for h in remoteheads if knownnode(h))
251 oldheads = sorted(h for h in remoteheads if knownnode(h))
248 # all nodes in outgoing.missing are children of either:
252 # all nodes in outgoing.missing are children of either:
249 # - an element of oldheads
253 # - an element of oldheads
250 # - another element of outgoing.missing
254 # - another element of outgoing.missing
251 # - nullrev
255 # - nullrev
252 # This explains why the new head are very simple to compute.
256 # This explains why the new head are very simple to compute.
253 r = repo.set('heads(%ln + %ln)', oldheads, outgoing.missing)
257 r = repo.set('heads(%ln + %ln)', oldheads, outgoing.missing)
254 newheads = list(c.node() for c in r)
258 newheads = sorted(c.node() for c in r)
255 # set some unsynced head to issue the "unsynced changes" warning
259 # set some unsynced head to issue the "unsynced changes" warning
256 if inc:
260 if inc:
257 unsynced = [None]
261 unsynced = [None]
General Comments 0
You need to be logged in to leave comments. Login now