diff --git a/contrib/dirstatenonnormalcheck.py b/contrib/dirstatenonnormalcheck.py --- a/contrib/dirstatenonnormalcheck.py +++ b/contrib/dirstatenonnormalcheck.py @@ -24,17 +24,27 @@ return res +INCONSISTENCY_MESSAGE = b"""%s call to %s + inconsistency in nonnormalset + result from dirstatemap: %s + expected nonnormalset: %s +""" + + def checkconsistency(ui, orig, dmap, _nonnormalset, label): """Compute nonnormalset from dmap, check that it matches _nonnormalset""" nonnormalcomputedmap = nonnormalentries(dmap) if _nonnormalset != nonnormalcomputedmap: b_orig = pycompat.sysbytes(repr(orig)) - ui.develwarn(b"%s call to %s\n" % (label, b_orig), config=b'dirstate') - ui.develwarn(b"inconsistency in nonnormalset\n", config=b'dirstate') b_nonnormal = pycompat.sysbytes(repr(_nonnormalset)) - ui.develwarn(b"[nonnormalset] %s\n" % b_nonnormal, config=b'dirstate') b_nonnormalcomputed = pycompat.sysbytes(repr(nonnormalcomputedmap)) - ui.develwarn(b"[map] %s\n" % b_nonnormalcomputed, config=b'dirstate') + msg = INCONSISTENCY_MESSAGE % ( + label, + b_orig, + b_nonnormal, + b_nonnormalcomputed, + ) + ui.develwarn(msg, config=b'dirstate') def _checkdirstate(orig, self, *args, **kwargs):