Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 1789:d5248726d22f
Merge with mercurial/tonfa
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Wed, 22 Feb 2006 08:04:46 +0100 |
parents | 2e0a288ca93e 750b9cd83965 |
children | 8a7a24b96697 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Wed Feb 22 07:51:32 2006 +0100 +++ b/mercurial/localrepo.py Wed Feb 22 08:04:46 2006 +0100 @@ -270,7 +270,14 @@ if not wait: raise inst self.ui.warn(_("waiting for lock held by %s\n") % inst.args[0]) - l = lock.lock(self.join(lockname), wait, releasefn) + try: + # default to 600 seconds timeout + l = lock.lock(self.join(lockname), + int(self.ui.config("ui", "timeout") or 600), + releasefn) + except lock.LockHeld, inst: + raise util.Abort(_("timeout while waiting for " + "lock held by %s") % inst.args[0]) if acquirefn: acquirefn() return l