inotify: remove the useless 'if st' checks in RepoWatcher.filestatus
authorNicolas Dumazet <nicdumz.commits@gmail.com>
Fri, 08 May 2009 17:17:03 +0900
changeset 8336 114f067229bd
parent 8335 713ec3f9c9de
child 8337 0e73e21d81ff
inotify: remove the useless 'if st' checks in RepoWatcher.filestatus Only call is in RepoWatcher.updatestatus: if st: self.filestatus(wfn, st) st can never be None
hgext/inotify/server.py
--- a/hgext/inotify/server.py	Mon May 04 21:18:33 2009 +0900
+++ b/hgext/inotify/server.py	Fri May 08 17:17:03 2009 +0900
@@ -242,8 +242,6 @@
         except KeyError:
             type_ = '?'
         if type_ == 'n':
-            if not st:
-                return '!'
             st_mode, st_size, st_mtime = st
             if size == -1:
                 return 'l'
@@ -252,8 +250,6 @@
             if time != int(st_mtime):
                 return 'l'
             return 'n'
-        if type_ in 'ma' and not st:
-            return '!'
         if type_ == '?' and self.repo.dirstate._ignore(fn):
             return 'i'
         return type_