##// END OF EJS Templates
lock: update the docstring with order information...
Pierre-Yves David -
r24746:e0c810d0 default
parent child Browse files
Show More
@@ -1183,7 +1183,10 b' class localrepository(object):'
1183 def lock(self, wait=True):
1183 def lock(self, wait=True):
1184 '''Lock the repository store (.hg/store) and return a weak reference
1184 '''Lock the repository store (.hg/store) and return a weak reference
1185 to the lock. Use this before modifying the store (e.g. committing or
1185 to the lock. Use this before modifying the store (e.g. committing or
1186 stripping). If you are opening a transaction, get a lock as well.)'''
1186 stripping). If you are opening a transaction, get a lock as well.)
1187
1188 If both 'lock' and 'wlock' must be acquired, ensure you always acquires
1189 'wlock' first to avoid a dead-lock hazard.'''
1187 l = self._lockref and self._lockref()
1190 l = self._lockref and self._lockref()
1188 if l is not None and l.held:
1191 if l is not None and l.held:
1189 l.lock()
1192 l.lock()
@@ -1203,7 +1206,11 b' class localrepository(object):'
1203 def wlock(self, wait=True):
1206 def wlock(self, wait=True):
1204 '''Lock the non-store parts of the repository (everything under
1207 '''Lock the non-store parts of the repository (everything under
1205 .hg except .hg/store) and return a weak reference to the lock.
1208 .hg except .hg/store) and return a weak reference to the lock.
1206 Use this before modifying files in .hg.'''
1209
1210 Use this before modifying files in .hg.
1211
1212 If both 'lock' and 'wlock' must be acquired, ensure you always acquires
1213 'wlock' first to avoid a dead-lock hazard.'''
1207 l = self._wlockref and self._wlockref()
1214 l = self._wlockref and self._wlockref()
1208 if l is not None and l.held:
1215 if l is not None and l.held:
1209 l.lock()
1216 l.lock()
General Comments 0
You need to be logged in to leave comments. Login now