equal
deleted
inserted
replaced
1097 or self.ui.configbool('devel', 'check-locks')): |
1097 or self.ui.configbool('devel', 'check-locks')): |
1098 if self._currentlock(self._lockref) is None: |
1098 if self._currentlock(self._lockref) is None: |
1099 raise error.ProgrammingError('transaction requires locking') |
1099 raise error.ProgrammingError('transaction requires locking') |
1100 tr = self.currenttransaction() |
1100 tr = self.currenttransaction() |
1101 if tr is not None: |
1101 if tr is not None: |
|
1102 scmutil.registersummarycallback(self, tr, desc) |
1102 return tr.nest() |
1103 return tr.nest() |
1103 |
1104 |
1104 # abort here if the journal already exists |
1105 # abort here if the journal already exists |
1105 if self.svfs.exists("journal"): |
1106 if self.svfs.exists("journal"): |
1106 raise error.RepoError( |
1107 raise error.RepoError( |
1253 tr.addabort('txnabort-hook', txnaborthook) |
1254 tr.addabort('txnabort-hook', txnaborthook) |
1254 # avoid eager cache invalidation. in-memory data should be identical |
1255 # avoid eager cache invalidation. in-memory data should be identical |
1255 # to stored data if transaction has no error. |
1256 # to stored data if transaction has no error. |
1256 tr.addpostclose('refresh-filecachestats', self._refreshfilecachestats) |
1257 tr.addpostclose('refresh-filecachestats', self._refreshfilecachestats) |
1257 self._transref = weakref.ref(tr) |
1258 self._transref = weakref.ref(tr) |
|
1259 scmutil.registersummarycallback(self, tr, desc) |
1258 return tr |
1260 return tr |
1259 |
1261 |
1260 def _journalfiles(self): |
1262 def _journalfiles(self): |
1261 return ((self.svfs, 'journal'), |
1263 return ((self.svfs, 'journal'), |
1262 (self.vfs, 'journal.dirstate'), |
1264 (self.vfs, 'journal.dirstate'), |