Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/lock.py @ 4941:8933b8ea871a
Use format string for lockname again (was changed by 3e25a6eb5c9a)
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sat, 21 Jul 2007 10:39:42 +0200 |
parents | 3e25a6eb5c9a |
children |
comparison
equal
deleted
inserted
replaced
4940:71fed370b7a7 | 4941:8933b8ea871a |
---|---|
58 inst.locker) | 58 inst.locker) |
59 | 59 |
60 def trylock(self): | 60 def trylock(self): |
61 if lock._host is None: | 61 if lock._host is None: |
62 lock._host = socket.gethostname() | 62 lock._host = socket.gethostname() |
63 lockname = lock._host + ':' + str(os.getpid()) | 63 lockname = '%s:%s' % (lock._host, os.getpid()) |
64 while not self.held: | 64 while not self.held: |
65 try: | 65 try: |
66 util.makelock(lockname, self.f) | 66 util.makelock(lockname, self.f) |
67 self.held = 1 | 67 self.held = 1 |
68 except (OSError, IOError), why: | 68 except (OSError, IOError), why: |