1691 timeout = 0 |
1691 timeout = 0 |
1692 warntimeout = 0 |
1692 warntimeout = 0 |
1693 if wait: |
1693 if wait: |
1694 timeout = self.ui.configint("ui", "timeout") |
1694 timeout = self.ui.configint("ui", "timeout") |
1695 warntimeout = self.ui.configint("ui", "timeout.warn") |
1695 warntimeout = self.ui.configint("ui", "timeout.warn") |
|
1696 # internal config: ui.signal-safe-lock |
|
1697 signalsafe = self.ui.configbool('ui', 'signal-safe-lock') |
1696 |
1698 |
1697 l = lockmod.trylock(self.ui, vfs, lockname, timeout, warntimeout, |
1699 l = lockmod.trylock(self.ui, vfs, lockname, timeout, warntimeout, |
1698 releasefn=releasefn, |
1700 releasefn=releasefn, |
1699 acquirefn=acquirefn, desc=desc, |
1701 acquirefn=acquirefn, desc=desc, |
1700 inheritchecker=inheritchecker, |
1702 inheritchecker=inheritchecker, |
1701 parentlock=parentlock) |
1703 parentlock=parentlock, |
|
1704 signalsafe=signalsafe) |
1702 return l |
1705 return l |
1703 |
1706 |
1704 def _afterlock(self, callback): |
1707 def _afterlock(self, callback): |
1705 """add a callback to be run when the repository is fully unlocked |
1708 """add a callback to be run when the repository is fully unlocked |
1706 |
1709 |