diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2011-10-01 20:49:36 +0000 |
---|---|---|
committer | Lorry <lorry@roadtrain.codethink.co.uk> | 2012-09-27 13:27:51 +0000 |
commit | 921ced43c48c1d170452a7b251b94cc96ec8dd44 (patch) | |
tree | 3c4a89176ea67fe4c7bf7b375488361a823c95fa /hgext/inotify | |
parent | 9039c805b0a7e36220101323f82735f08a104b37 (diff) | |
download | mercurial-tarball-921ced43c48c1d170452a7b251b94cc96ec8dd44.tar.gz |
Imported from /srv/lorry/lorry-area/mercurial-tarball/mercurial-1.9.3.tar.gz.HEADmercurial-1.9.3master
Diffstat (limited to 'hgext/inotify')
-rw-r--r-- | hgext/inotify/__init__.py | 8 | ||||
-rw-r--r-- | hgext/inotify/linuxserver.py | 7 | ||||
-rw-r--r-- | hgext/inotify/server.py | 4 |
3 files changed, 6 insertions, 13 deletions
diff --git a/hgext/inotify/__init__.py b/hgext/inotify/__init__.py index 09c8bef..5e9f2cd 100644 --- a/hgext/inotify/__init__.py +++ b/hgext/inotify/__init__.py @@ -11,12 +11,9 @@ # todo: socket permissions from mercurial.i18n import _ -from mercurial import util import server from client import client, QueryFailed -testedwith = 'internal' - def serve(ui, repo, **opts): '''start an inotify server for this repository''' server.start(ui, repo.dirstate, repo.root, opts) @@ -34,7 +31,7 @@ def debuginotify(ui, repo, **opts): ui.write((' %s/\n') % path) def reposetup(ui, repo): - if not util.safehasattr(repo, 'dirstate'): + if not hasattr(repo, 'dirstate'): return class inotifydirstate(repo.dirstate.__class__): @@ -48,8 +45,7 @@ def reposetup(ui, repo): files = match.files() if '.' in files: files = [] - if (self._inotifyon and not ignored and not subrepos and - not self._dirty): + if self._inotifyon and not ignored and not subrepos and not self._dirty: cli = client(ui, repo) try: result = cli.statusquery(files, match, False, diff --git a/hgext/inotify/linuxserver.py b/hgext/inotify/linuxserver.py index a92b540..e2b9115 100644 --- a/hgext/inotify/linuxserver.py +++ b/hgext/inotify/linuxserver.py @@ -7,7 +7,7 @@ # GNU General Public License version 2 or any later version. from mercurial.i18n import _ -from mercurial import osutil, util, error +from mercurial import osutil, util import server import errno, os, select, stat, sys, time @@ -431,10 +431,7 @@ class master(object): def shutdown(self): for obj in pollable.instances.itervalues(): - try: - obj.shutdown() - except error.SignalInterrupt: - pass + obj.shutdown() def run(self): self.repowatcher.setup() diff --git a/hgext/inotify/server.py b/hgext/inotify/server.py index b654b17..b2dcaad 100644 --- a/hgext/inotify/server.py +++ b/hgext/inotify/server.py @@ -355,7 +355,7 @@ class socketlistener(object): except (OSError, socket.error), inst: try: os.unlink(self.realsockpath) - except OSError: + except: pass os.rmdir(tempdir) if inst.errno == errno.EEXIST: @@ -416,7 +416,7 @@ class socketlistener(object): # try to send back our version to the client # this way, the client too is informed of the mismatch sock.sendall(chr(common.version)) - except socket.error: + except: pass return |