mercurial/lock.py
branchstable
changeset 32087 e1938d6051da
parent 31378 2e48c776a874
child 32088 0d892d820a51
equal deleted inserted replaced
32086:b59a292d0a53 32087:e1938d6051da
   129                 self.vfs.makelock(lockname, self.f)
   129                 self.vfs.makelock(lockname, self.f)
   130                 self.held = 1
   130                 self.held = 1
   131             except (OSError, IOError) as why:
   131             except (OSError, IOError) as why:
   132                 if why.errno == errno.EEXIST:
   132                 if why.errno == errno.EEXIST:
   133                     locker = self._readlock()
   133                     locker = self._readlock()
       
   134                     if locker is None:
       
   135                         continue
       
   136 
   134                     # special case where a parent process holds the lock -- this
   137                     # special case where a parent process holds the lock -- this
   135                     # is different from the pid being different because we do
   138                     # is different from the pid being different because we do
   136                     # want the unlock and postrelease functions to be called,
   139                     # want the unlock and postrelease functions to be called,
   137                     # but the lockfile to not be removed.
   140                     # but the lockfile to not be removed.
   138                     if locker == self.parentlock:
   141                     if locker == self.parentlock: