comparison mercurial/discovery.py @ 32673:bd966b9f3274

checkheads: clarify that we no longer touch the head unknown locally Since c6cb21ddf74a, heads unknown locally no longer get any post processing from obsolescence markers. We clarify this fact by only feeding the list of locally known new heads to the function. This simplification of the input will help moving that post-processing earlier in the function.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 29 May 2017 05:20:09 +0200
parents 315d74d0f059
children 7a7c4f3afb98
comparison
equal deleted inserted replaced
32672:315d74d0f059 32673:bd966b9f3274
338 cctx = repo.set('%ld', outgoing.common) 338 cctx = repo.set('%ld', outgoing.common)
339 allfuturecommon = set(c.node() for c in cctx) 339 allfuturecommon = set(c.node() for c in cctx)
340 allfuturecommon.update(allmissing) 340 allfuturecommon.update(allmissing)
341 for branch, heads in sorted(headssum.iteritems()): 341 for branch, heads in sorted(headssum.iteritems()):
342 remoteheads, newheads, unsyncedheads = heads 342 remoteheads, newheads, unsyncedheads = heads
343 candidate_newhs = set(newheads)
344 # add unsynced data 343 # add unsynced data
345 if remoteheads is None: 344 if remoteheads is None:
346 oldhs = set() 345 oldhs = set()
347 else: 346 else:
348 oldhs = set(remoteheads) 347 oldhs = set(remoteheads)
349 oldhs.update(unsyncedheads) 348 oldhs.update(unsyncedheads)
350 candidate_newhs.update(unsyncedheads)
351 dhs = None # delta heads, the new heads on branch 349 dhs = None # delta heads, the new heads on branch
352 if not repo.obsstore: 350 if not repo.obsstore:
353 discardedheads = set() 351 discardedheads = set()
354 newhs = candidate_newhs 352 newhs = set(newheads)
355 else: 353 else:
356 newhs, discardedheads = _postprocessobsolete(pushop, 354 newhs, discardedheads = _postprocessobsolete(pushop,
357 allfuturecommon, 355 allfuturecommon,
358 candidate_newhs) 356 newheads)
357 newhs.update(unsyncedheads)
359 unsynced = sorted(h for h in unsyncedheads if h not in discardedheads) 358 unsynced = sorted(h for h in unsyncedheads if h not in discardedheads)
360 if unsynced: 359 if unsynced:
361 if None in unsynced: 360 if None in unsynced:
362 # old remote, no heads data 361 # old remote, no heads data
363 heads = None 362 heads = None