# HG changeset patch # User Matt Mackall # Date 2008-10-12 20:21:08 # Node ID 4033195d455b2ea72a28961b8505e554fde9be97 # Parent 1fcc282e2c4361e80bf724f9479d634a8f3399a8 inotify: avoid status getting out of sync Always looking up oldstatus keeps us from failing to update our state when we disagree with the dirstate. diff --git a/hgext/inotify/server.py b/hgext/inotify/server.py --- a/hgext/inotify/server.py +++ b/hgext/inotify/server.py @@ -266,15 +266,14 @@ class Watcher(object): return 'i' return type_ - def updatestatus(self, wfn, st=None, status=None, oldstatus=None): + def updatestatus(self, wfn, st=None, status=None): if st: status = self.filestatus(wfn, st) else: self.statcache.pop(wfn, None) root, fn = self.split(wfn) d = self.dir(self.tree, root) - if oldstatus is None: - oldstatus = d.get(fn) + oldstatus = d.get(fn) isdir = False if oldstatus: try: @@ -343,7 +342,7 @@ class Watcher(object): if status == 'r' and not st: self.updatestatus(wfn, st, status=status) else: - self.updatestatus(wfn, st, oldstatus=status) + self.updatestatus(wfn, st) self.check_deleted('!') self.check_deleted('r')