##// 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 235 newmap.update(repo, (ctx.rev() for ctx in missingctx))
236 236 for branch, newheads in newmap.iteritems():
237 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 242 return headssum
239 243
240 244 def _oldheadssummary(repo, remoteheads, outgoing, inc=False):
@@ -244,14 +248,14 b' def _oldheadssummary(repo, remoteheads, '
244 248 # Construct {old,new}map with branch = None (topological branch).
245 249 # (code based on update)
246 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 252 # all nodes in outgoing.missing are children of either:
249 253 # - an element of oldheads
250 254 # - another element of outgoing.missing
251 255 # - nullrev
252 256 # This explains why the new head are very simple to compute.
253 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 259 # set some unsynced head to issue the "unsynced changes" warning
256 260 if inc:
257 261 unsynced = [None]
General Comments 0
You need to be logged in to leave comments. Login now