Show More
@@ -24,17 +24,27 b' def nonnormalentries(dmap):' | |||||
24 | return res |
|
24 | return res | |
25 |
|
25 | |||
26 |
|
26 | |||
|
27 | INCONSISTENCY_MESSAGE = b"""%s call to %s | |||
|
28 | inconsistency in nonnormalset | |||
|
29 | result from dirstatemap: %s | |||
|
30 | expected nonnormalset: %s | |||
|
31 | """ | |||
|
32 | ||||
|
33 | ||||
27 | def checkconsistency(ui, orig, dmap, _nonnormalset, label): |
|
34 | def checkconsistency(ui, orig, dmap, _nonnormalset, label): | |
28 | """Compute nonnormalset from dmap, check that it matches _nonnormalset""" |
|
35 | """Compute nonnormalset from dmap, check that it matches _nonnormalset""" | |
29 | nonnormalcomputedmap = nonnormalentries(dmap) |
|
36 | nonnormalcomputedmap = nonnormalentries(dmap) | |
30 | if _nonnormalset != nonnormalcomputedmap: |
|
37 | if _nonnormalset != nonnormalcomputedmap: | |
31 | b_orig = pycompat.sysbytes(repr(orig)) |
|
38 | b_orig = pycompat.sysbytes(repr(orig)) | |
32 | ui.develwarn(b"%s call to %s\n" % (label, b_orig), config=b'dirstate') |
|
|||
33 | ui.develwarn(b"inconsistency in nonnormalset\n", config=b'dirstate') |
|
|||
34 | b_nonnormal = pycompat.sysbytes(repr(_nonnormalset)) |
|
39 | b_nonnormal = pycompat.sysbytes(repr(_nonnormalset)) | |
35 | ui.develwarn(b"[nonnormalset] %s\n" % b_nonnormal, config=b'dirstate') |
|
|||
36 | b_nonnormalcomputed = pycompat.sysbytes(repr(nonnormalcomputedmap)) |
|
40 | b_nonnormalcomputed = pycompat.sysbytes(repr(nonnormalcomputedmap)) | |
37 | ui.develwarn(b"[map] %s\n" % b_nonnormalcomputed, config=b'dirstate') |
|
41 | msg = INCONSISTENCY_MESSAGE % ( | |
|
42 | label, | |||
|
43 | b_orig, | |||
|
44 | b_nonnormal, | |||
|
45 | b_nonnormalcomputed, | |||
|
46 | ) | |||
|
47 | ui.develwarn(msg, config=b'dirstate') | |||
38 |
|
48 | |||
39 |
|
49 | |||
40 | def _checkdirstate(orig, self, *args, **kwargs): |
|
50 | def _checkdirstate(orig, self, *args, **kwargs): |
General Comments 0
You need to be logged in to leave comments.
Login now