Mercurial > hg
changeset 8794:1c610db4a897
inotify: repowatcher: don't use a watches attribute to count watches
The encapsulated watcher alread has a __len__ method for this purpose.
Also, repowatcher.watches was never decremented on watch deletions.
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Sat, 23 May 2009 20:38:08 +0900 |
parents | 9d0c521bce0e |
children | 51c29aec0b75 ca14b3982ffe |
files | hgext/inotify/server.py |
diffstat | 1 files changed, 0 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/inotify/server.py Thu May 21 23:51:54 2009 +0900 +++ b/hgext/inotify/server.py Sat May 23 20:38:08 2009 +0900 @@ -235,7 +235,6 @@ self.statcache = {} self.statustrees = dict([(s, {}) for s in self.statuskeys]) - self.watches = 0 self.last_event = None self.lastevent = {} @@ -277,7 +276,6 @@ self.ui.note(_('watching %r\n') % path[len(self.wprefix):]) try: self.watcher.add(path, mask) - self.watches += 1 except OSError, err: if err.errno in (errno.ENOENT, errno.ENOTDIR): return