mercurial/lock.py
changeset 17510 7c44b703657b
parent 15589 cc24e4ed3e0c
child 17537 31f32a96e1e3
equal deleted inserted replaced
17509:f7767f52e9eb 17510:7c44b703657b
   121 
   121 
   122     def release(self):
   122     def release(self):
   123         """release the lock and execute callback function if any
   123         """release the lock and execute callback function if any
   124 
   124 
   125         If the lock have been aquired multiple time, the actual release is
   125         If the lock have been aquired multiple time, the actual release is
   126         delayed to the last relase call."""
   126         delayed to the last release call."""
   127         if self.held > 1:
   127         if self.held > 1:
   128             self.held -= 1
   128             self.held -= 1
   129         elif self.held == 1:
   129         elif self.held == 1:
   130             self.held = 0
   130             self.held = 0
   131             if self.releasefn:
   131             if self.releasefn: