Mercurial > hg-stable
changeset 8383:dcfdcb51ac5c
inotify: make mask a class variable since it's instance-independant
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Fri, 08 May 2009 16:40:39 +0900 |
parents | 6f44b1adc948 |
children | 483d9b2103da |
files | hgext/inotify/server.py |
diffstat | 1 files changed, 12 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/inotify/server.py Fri May 08 17:45:01 2009 +0900 +++ b/hgext/inotify/server.py Fri May 08 16:40:39 2009 +0900 @@ -116,6 +116,18 @@ class RepoWatcher(object): poll_events = select.POLLIN statuskeys = 'almr!?' + mask = ( + inotify.IN_ATTRIB | + inotify.IN_CREATE | + inotify.IN_DELETE | + inotify.IN_DELETE_SELF | + inotify.IN_MODIFY | + inotify.IN_MOVED_FROM | + inotify.IN_MOVED_TO | + inotify.IN_MOVE_SELF | + inotify.IN_ONLYDIR | + inotify.IN_UNMOUNT | + 0) def __init__(self, ui, repo, master): self.ui = ui @@ -123,18 +135,6 @@ self.wprefix = self.repo.wjoin('') self.timeout = None self.master = master - self.mask = ( - inotify.IN_ATTRIB | - inotify.IN_CREATE | - inotify.IN_DELETE | - inotify.IN_DELETE_SELF | - inotify.IN_MODIFY | - inotify.IN_MOVED_FROM | - inotify.IN_MOVED_TO | - inotify.IN_MOVE_SELF | - inotify.IN_ONLYDIR | - inotify.IN_UNMOUNT | - 0) try: self.watcher = watcher.Watcher() except OSError, err: