mercurial/localrepo.py
changeset 29186 e0fc0ed41935
parent 29104 b207653ada10
child 29190 e51f34183599
equal deleted inserted replaced
29185:28e7f590be2d 29186:e0fc0ed41935
   998     def transaction(self, desc, report=None):
   998     def transaction(self, desc, report=None):
   999         if (self.ui.configbool('devel', 'all-warnings')
   999         if (self.ui.configbool('devel', 'all-warnings')
  1000                 or self.ui.configbool('devel', 'check-locks')):
  1000                 or self.ui.configbool('devel', 'check-locks')):
  1001             l = self._lockref and self._lockref()
  1001             l = self._lockref and self._lockref()
  1002             if l is None or not l.held:
  1002             if l is None or not l.held:
  1003                 self.ui.develwarn('transaction with no lock')
  1003                 raise RuntimeError('programming error: transaction requires '
       
  1004                                    'locking')
  1004         tr = self.currenttransaction()
  1005         tr = self.currenttransaction()
  1005         if tr is not None:
  1006         if tr is not None:
  1006             return tr.nest()
  1007             return tr.nest()
  1007 
  1008 
  1008         # abort here if the journal already exists
  1009         # abort here if the journal already exists