##// END OF EJS Templates
localrepo: add a `currentlock` method...
marmoute -
r51250:69019164 stable
parent child Browse files
Show More
@@ -1810,6 +1810,9 b' class ilocalrepositorymain(interfaceutil'
1810 def lock(wait=True):
1810 def lock(wait=True):
1811 """Lock the repository store and return a lock instance."""
1811 """Lock the repository store and return a lock instance."""
1812
1812
1813 def currentlock():
1814 """Return the lock if it's held or None."""
1815
1813 def wlock(wait=True):
1816 def wlock(wait=True):
1814 """Lock the non-store parts of the repository."""
1817 """Lock the non-store parts of the repository."""
1815
1818
@@ -3141,6 +3141,10 b' class localrepository:'
3141 """Returns the wlock if it's held, or None if it's not."""
3141 """Returns the wlock if it's held, or None if it's not."""
3142 return self._currentlock(self._wlockref)
3142 return self._currentlock(self._wlockref)
3143
3143
3144 def currentlock(self):
3145 """Returns the lock if it's held, or None if it's not."""
3146 return self._currentlock(self._lockref)
3147
3144 def checkcommitpatterns(self, wctx, match, status, fail):
3148 def checkcommitpatterns(self, wctx, match, status, fail):
3145 """check for commit arguments that aren't committable"""
3149 """check for commit arguments that aren't committable"""
3146 if match.isexact() or match.prefix():
3150 if match.isexact() or match.prefix():
General Comments 0
You need to be logged in to leave comments. Login now