debug-discovery: deal with case where common is empty stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 26 Jul 2022 10:48:06 +0200
branchstable
changeset 49404 c6aac50038bb
parent 49403 ac4fda5d3ccd
child 49405 f64f66167afc
debug-discovery: deal with case where common is empty This code was previously confused by case where: `heads_common == {nullid}`
mercurial/debugcommands.py
--- a/mercurial/debugcommands.py	Tue Jul 26 10:39:27 2022 +0200
+++ b/mercurial/debugcommands.py	Tue Jul 26 10:48:06 2022 +0200
@@ -1330,6 +1330,8 @@
             common, hds = doit(localrevs, remoterevs)
 
     # compute all statistics
+    if len(common) == 1 and repo.nullid in common:
+        common = set()
     heads_common = set(common)
     heads_remote = set(hds)
     heads_local = set(repo.heads())