mercurial/dirstate.py
changeset 50117 3433723d1b9b
parent 50115 62f633f751a4
child 50118 65943224c184
equal deleted inserted replaced
50116:9b49809eb612 50117:3433723d1b9b
   188         if self._invalidated_context:
   188         if self._invalidated_context:
   189             msg = "trying to use an invalidated dirstate before it has reset"
   189             msg = "trying to use an invalidated dirstate before it has reset"
   190             raise error.ProgrammingError(msg)
   190             raise error.ProgrammingError(msg)
   191 
   191 
   192         has_tr = repo.currenttransaction() is not None
   192         has_tr = repo.currenttransaction() is not None
       
   193         if not has_tr and self._changing_level == 0 and self._dirty:
       
   194             msg = "entering a changing context, but dirstate is already dirty"
       
   195             raise error.ProgrammingError(msg)
   193 
   196 
   194         # different type of change are mutually exclusive
   197         # different type of change are mutually exclusive
   195         if self._change_type is None:
   198         if self._change_type is None:
   196             assert self._changing_level == 0
   199             assert self._changing_level == 0
   197             self._change_type = change_type
   200             self._change_type = change_type