comparison mercurial/localrepo.py @ 25290:8f88f768e24c

devel: rename 'all' to 'all-warnings' (BC) We have started to isolate extra usecases for developer-only output that is not a warning. As the section has the fairly generic name 'devel' it makes sense to tuck them there. As a result, 'all' becomes a bit misleading so we rename it to 'all-warnings'. This will break some developer setups but the tests are still fine and developers will likely spot this change.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 26 May 2015 14:14:36 -0700
parents 144085249c3f
children 0bee97fa1fa8
comparison
equal deleted inserted replaced
25289:6ac860f700b5 25290:8f88f768e24c
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