##// END OF EJS Templates
dirstate: use the new `check_invalidated` decorator for `_changing`...
marmoute -
r51014:de42ba9d default
parent child Browse files
Show More
@@ -193,13 +193,11 b' class dirstate:'
193 self._pl
193 self._pl
194
194
195 @contextlib.contextmanager
195 @contextlib.contextmanager
196 @check_invalidated
196 def _changing(self, repo, change_type):
197 def _changing(self, repo, change_type):
197 if repo.currentwlock() is None:
198 if repo.currentwlock() is None:
198 msg = b"trying to change the dirstate without holding the wlock"
199 msg = b"trying to change the dirstate without holding the wlock"
199 raise error.ProgrammingError(msg)
200 raise error.ProgrammingError(msg)
200 if self._invalidated_context:
201 msg = "trying to use an invalidated dirstate before it has reset"
202 raise error.ProgrammingError(msg)
203
201
204 has_tr = repo.currenttransaction() is not None
202 has_tr = repo.currenttransaction() is not None
205 if not has_tr and self._changing_level == 0 and self._dirty:
203 if not has_tr and self._changing_level == 0 and self._dirty:
General Comments 0
You need to be logged in to leave comments. Login now