equal
deleted
inserted
replaced
942 if tr and tr.running(): |
942 if tr and tr.running(): |
943 return tr |
943 return tr |
944 return None |
944 return None |
945 |
945 |
946 def transaction(self, desc, report=None): |
946 def transaction(self, desc, report=None): |
947 if (self.ui.configbool('devel', 'all') |
947 if (self.ui.configbool('devel', 'all-warnings') |
948 or self.ui.configbool('devel', 'check-locks')): |
948 or self.ui.configbool('devel', 'check-locks')): |
949 l = self._lockref and self._lockref() |
949 l = self._lockref and self._lockref() |
950 if l is None or not l.held: |
950 if l is None or not l.held: |
951 scmutil.develwarn(self.ui, 'transaction with no lock') |
951 scmutil.develwarn(self.ui, 'transaction with no lock') |
952 tr = self.currenttransaction() |
952 tr = self.currenttransaction() |
1247 l.lock() |
1247 l.lock() |
1248 return l |
1248 return l |
1249 |
1249 |
1250 # We do not need to check for non-waiting lock aquisition. Such |
1250 # We do not need to check for non-waiting lock aquisition. Such |
1251 # acquisition would not cause dead-lock as they would just fail. |
1251 # acquisition would not cause dead-lock as they would just fail. |
1252 if wait and (self.ui.configbool('devel', 'all') |
1252 if wait and (self.ui.configbool('devel', 'all-warnings') |
1253 or self.ui.configbool('devel', 'check-locks')): |
1253 or self.ui.configbool('devel', 'check-locks')): |
1254 l = self._lockref and self._lockref() |
1254 l = self._lockref and self._lockref() |
1255 if l is not None and l.held: |
1255 if l is not None and l.held: |
1256 scmutil.develwarn(self.ui, '"wlock" acquired after "lock"') |
1256 scmutil.develwarn(self.ui, '"wlock" acquired after "lock"') |
1257 |
1257 |