equal
deleted
inserted
replaced
924 def transaction(self, desc, report=None): |
924 def transaction(self, desc, report=None): |
925 if (self.ui.configbool('devel', 'all') |
925 if (self.ui.configbool('devel', 'all') |
926 or self.ui.configbool('devel', 'check-locks')): |
926 or self.ui.configbool('devel', 'check-locks')): |
927 l = self._lockref and self._lockref() |
927 l = self._lockref and self._lockref() |
928 if l is None or not l.held: |
928 if l is None or not l.held: |
929 msg = 'transaction with no lock\n' |
929 scmutil.develwarn(self.ui, 'transaction with no lock\n') |
930 if self.ui.tracebackflag: |
|
931 util.debugstacktrace(msg, 1) |
|
932 else: |
|
933 self.ui.write_err(msg) |
|
934 tr = self.currenttransaction() |
930 tr = self.currenttransaction() |
935 if tr is not None: |
931 if tr is not None: |
936 return tr.nest() |
932 return tr.nest() |
937 |
933 |
938 # abort here if the journal already exists |
934 # abort here if the journal already exists |
1218 |
1214 |
1219 if (self.ui.configbool('devel', 'all') |
1215 if (self.ui.configbool('devel', 'all') |
1220 or self.ui.configbool('devel', 'check-locks')): |
1216 or self.ui.configbool('devel', 'check-locks')): |
1221 l = self._lockref and self._lockref() |
1217 l = self._lockref and self._lockref() |
1222 if l is not None and l.held: |
1218 if l is not None and l.held: |
1223 msg = '"wlock" acquired after "lock"\n' |
1219 scmutil.develwarn(self.ui, '"wlock" acquired after "lock"\n') |
1224 if self.ui.tracebackflag: |
|
1225 util.debugstacktrace(msg, 1) |
|
1226 else: |
|
1227 self.ui.write_err(msg) |
|
1228 |
1220 |
1229 def unlock(): |
1221 def unlock(): |
1230 if self.dirstate.pendingparentchange(): |
1222 if self.dirstate.pendingparentchange(): |
1231 self.dirstate.invalidate() |
1223 self.dirstate.invalidate() |
1232 else: |
1224 else: |