Mercurial > hg
comparison contrib/dirstatenonnormalcheck.py @ 29100:3fd94f603190
devel: use the 'config' argument for the dirstate normalisation develwarn
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Sun, 08 May 2016 10:43:41 +0200 |
parents | b502138f5faa |
children | 60927b19ed65 |
comparison
equal
deleted
inserted
replaced
29099:bdc86e178255 | 29100:3fd94f603190 |
---|---|
23 | 23 |
24 def checkconsistency(ui, orig, dmap, _nonnormalset, label): | 24 def checkconsistency(ui, orig, dmap, _nonnormalset, label): |
25 """Compute nonnormalset from dmap, check that it matches _nonnormalset""" | 25 """Compute nonnormalset from dmap, check that it matches _nonnormalset""" |
26 nonnormalcomputedmap = nonnormalentries(dmap) | 26 nonnormalcomputedmap = nonnormalentries(dmap) |
27 if _nonnormalset != nonnormalcomputedmap: | 27 if _nonnormalset != nonnormalcomputedmap: |
28 ui.develwarn("%s call to %s\n" % (label, orig)) | 28 ui.develwarn("%s call to %s\n" % (label, orig), config='dirstate') |
29 ui.develwarn("inconsistency in nonnormalset\n") | 29 ui.develwarn("inconsistency in nonnormalset\n", config='dirstate') |
30 ui.develwarn("[nonnormalset] %s\n" % _nonnormalset) | 30 ui.develwarn("[nonnormalset] %s\n" % _nonnormalset, config='dirstate') |
31 ui.develwarn("[map] %s\n" % nonnormalcomputedmap) | 31 ui.develwarn("[map] %s\n" % nonnormalcomputedmap, config='dirstate') |
32 | 32 |
33 def _checkdirstate(orig, self, arg): | 33 def _checkdirstate(orig, self, arg): |
34 """Check nonnormal set consistency before and after the call to orig""" | 34 """Check nonnormal set consistency before and after the call to orig""" |
35 checkconsistency(self._ui, orig, self._map, self._nonnormalset, "before") | 35 checkconsistency(self._ui, orig, self._map, self._nonnormalset, "before") |
36 r = orig(self, arg) | 36 r = orig(self, arg) |