changeset 49404: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 f64f66167afc
files mercurial/debugcommands.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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())