inotify: inotify.server.walk() filetype is never used, do not yield it
authorNicolas Dumazet <nicdumz.commits@gmail.com>
Mon, 04 May 2009 18:23:05 +0900
changeset 8334 0695288e8c37
parent 8333 89c80c3dc584
child 8335 713ec3f9c9de
inotify: inotify.server.walk() filetype is never used, do not yield it
hgext/inotify/server.py
--- a/hgext/inotify/server.py	Mon May 04 20:26:27 2009 +0200
+++ b/hgext/inotify/server.py	Mon May 04 18:23:05 2009 +0900
@@ -74,7 +74,7 @@
                     else:
                         dirs.append(name)
                 elif kind in (stat.S_IFREG, stat.S_IFLNK):
-                    files.append((name, kind))
+                    files.append(name)
             yield fullpath, dirs, files
 
             for subdir in dirs:
@@ -319,12 +319,12 @@
         self.handle_timeout()
         ds = self.repo.dirstate._map.copy()
         self.add_watch(join(self.repo.root, topdir), self.mask)
-        for root, dirs, entries in walk(self.repo, topdir):
+        for root, dirs, files in walk(self.repo, topdir):
             for d in dirs:
                 self.add_watch(join(root, d), self.mask)
             wroot = root[len(self.wprefix):]
             d = self.dir(self.tree, wroot)
-            for fn, kind in entries:
+            for fn in files:
                 wfn = join(wroot, fn)
                 self.updatestatus(wfn, self.getstat(wfn))
                 ds.pop(wfn, None)