Mercurial > hg
comparison contrib/dirstatenonnormalcheck.py @ 34674:60927b19ed65
dirstate: move nonnormal and otherparent sets to dirstatemap
As part of separating dirstate business logic from storage, let's move the
nonnormal and otherparent storage to the dirstatemap class. This will allow
alternative dirstate storage to persist these sets instead of recomputing them.
Differential Revision: https://phab.mercurial-scm.org/D979
author | Durham Goode <durham@fb.com> |
---|---|
date | Thu, 05 Oct 2017 11:34:41 -0700 |
parents | 3fd94f603190 |
children | 6e7fae8f1c6c |
comparison
equal
deleted
inserted
replaced
34673:e2214632c3a2 | 34674:60927b19ed65 |
---|---|
30 ui.develwarn("[nonnormalset] %s\n" % _nonnormalset, config='dirstate') | 30 ui.develwarn("[nonnormalset] %s\n" % _nonnormalset, config='dirstate') |
31 ui.develwarn("[map] %s\n" % nonnormalcomputedmap, config='dirstate') | 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._map.nonnormalset, |
36 "before") | |
36 r = orig(self, arg) | 37 r = orig(self, arg) |
37 checkconsistency(self._ui, orig, self._map, self._nonnormalset, "after") | 38 checkconsistency(self._ui, orig, self._map, self._map.nonnormalset, "after") |
38 return r | 39 return r |
39 | 40 |
40 def extsetup(ui): | 41 def extsetup(ui): |
41 """Wrap functions modifying dirstate to check nonnormalset consistency""" | 42 """Wrap functions modifying dirstate to check nonnormalset consistency""" |
42 dirstatecl = dirstate.dirstate | 43 dirstatecl = dirstate.dirstate |