--- a/hgext/inotify/server.py Tue Aug 11 22:45:38 2009 +0200
+++ b/hgext/inotify/server.py Sun Jun 28 19:46:36 2009 +0900
@@ -443,14 +443,13 @@
if oldstatus and oldstatus in self.statuskeys \
and oldstatus != newstatus:
del self.statustrees[oldstatus].dir(root).files[fn]
- if newstatus and newstatus != 'i':
+
+ if newstatus in (None, 'i'):
+ d.files.pop(fn, None)
+ elif oldstatus != newstatus:
d.files[fn] = newstatus
- if newstatus in self.statuskeys:
- dd = self.statustrees[newstatus].dir(root)
- if oldstatus != newstatus or fn not in dd.files:
- dd.files[fn] = newstatus
- else:
- d.files.pop(fn, None)
+ if newstatus != 'n':
+ self.statustrees[newstatus].dir(root).files[fn] = newstatus
def check_deleted(self, key):