mercurial/lock.py
changeset 31363 e6a2b625e0d9
parent 30941 1f151a33af8e
child 31384 d57aa655ce97
equal deleted inserted replaced
31362:089e37802fb3 31363:e6a2b625e0d9
   116         if self.held:
   116         if self.held:
   117             self.held += 1
   117             self.held += 1
   118             return
   118             return
   119         if lock._host is None:
   119         if lock._host is None:
   120             lock._host = _getlockprefix()
   120             lock._host = _getlockprefix()
   121         lockname = '%s:%s' % (lock._host, self.pid)
   121         lockname = '%s:%d' % (lock._host, self.pid)
   122         retry = 5
   122         retry = 5
   123         while not self.held and retry:
   123         while not self.held and retry:
   124             retry -= 1
   124             retry -= 1
   125             try:
   125             try:
   126                 self.vfs.makelock(lockname, self.f)
   126                 self.vfs.makelock(lockname, self.f)