diff -r 283f3b413f19 -r 08064db9f005 hgext/inotify/server.py --- a/hgext/inotify/server.py Wed Feb 17 20:30:57 2010 +0100 +++ b/hgext/inotify/server.py Wed Feb 17 20:44:49 2010 +0100 @@ -19,6 +19,8 @@ class AlreadyStartedException(Exception): pass +class TimeoutException(Exception): + pass def join(a, b): if a: @@ -444,9 +446,11 @@ master = _server.master def start(ui, dirstate, root, opts): - timeout = opts.get('timeout') + timeout = opts.get('idle_timeout') if timeout: - timeout = float(timeout) * 1e3 + timeout = float(timeout) * 60000 + else: + timeout = None class service(object): def init(self): @@ -457,7 +461,10 @@ def run(self): try: - self.master.run() + try: + self.master.run() + except TimeoutException: + pass finally: self.master.shutdown()