Mercurial > hg
diff hgext/inotify/server.py @ 8385:1536501ade62
inotify: Coding Style: name classes in lowercase.
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Mon, 11 May 2009 08:19:28 +0900 |
parents | 483d9b2103da |
children | 4aad982111b6 |
line wrap: on
line diff
--- a/hgext/inotify/server.py Fri May 08 16:28:52 2009 +0900 +++ b/hgext/inotify/server.py Mon May 11 08:19:28 2009 +0900 @@ -113,7 +113,7 @@ raise util.Abort(_('cannot watch %s until inotify watch limit is raised') % repo.root) -class RepoWatcher(object): +class repowatcher(object): poll_events = select.POLLIN statuskeys = 'almr!?' mask = ( @@ -136,11 +136,11 @@ self.timeout = None self.master = master try: - self.watcher = watcher.Watcher() + self.watcher = watcher.watcher() except OSError, err: raise util.Abort(_('inotify service not available: %s') % err.strerror) - self.threshold = watcher.Threshold(self.watcher) + self.threshold = watcher.threshold(self.watcher) self.registered = True self.fileno = self.watcher.fileno @@ -542,7 +542,7 @@ def shutdown(self): self.watcher.close() -class Server(object): +class server(object): poll_events = select.POLLIN def __init__(self, ui, repo, repowatcher, timeout): @@ -658,13 +658,13 @@ if err.errno != errno.ENOENT: raise -class Master(object): +class master(object): def __init__(self, ui, repo, timeout=None): self.ui = ui self.repo = repo self.poll = select.poll() - self.repowatcher = RepoWatcher(ui, repo, self) - self.server = Server(ui, repo, self.repowatcher, timeout) + self.repowatcher = repowatcher(ui, repo, self) + self.server = server(ui, repo, self.repowatcher, timeout) self.table = {} for obj in (self.repowatcher, self.server): fd = obj.fileno() @@ -727,7 +727,7 @@ except OSError: pass - m = Master(ui, repo) + m = master(ui, repo) sys.stdout.flush() sys.stderr.flush()