Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/debugcommands.py @ 49393:c6aac50038bb stable
debug-discovery: deal with case where common is empty
This code was previously confused by case where:
`heads_common == {nullid}`
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 26 Jul 2022 10:48:06 +0200 |
parents | ac4fda5d3ccd |
children | f69bffd00abe |
comparison
equal
deleted
inserted
replaced
49392:ac4fda5d3ccd | 49393:c6aac50038bb |
---|---|
1328 with may_capture_output(): | 1328 with may_capture_output(): |
1329 with util.timedcm('debug-discovery') as t: | 1329 with util.timedcm('debug-discovery') as t: |
1330 common, hds = doit(localrevs, remoterevs) | 1330 common, hds = doit(localrevs, remoterevs) |
1331 | 1331 |
1332 # compute all statistics | 1332 # compute all statistics |
1333 if len(common) == 1 and repo.nullid in common: | |
1334 common = set() | |
1333 heads_common = set(common) | 1335 heads_common = set(common) |
1334 heads_remote = set(hds) | 1336 heads_remote = set(hds) |
1335 heads_local = set(repo.heads()) | 1337 heads_local = set(repo.heads()) |
1336 # note: they cannot be a local or remote head that is in common and not | 1338 # note: they cannot be a local or remote head that is in common and not |
1337 # itself a head of common. | 1339 # itself a head of common. |