Mercurial > hg-stable
changeset 7086:4033195d455b
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.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 12 Oct 2008 15:21:08 -0500 |
parents | 1fcc282e2c43 |
children | 62c71741ae7d |
files | hgext/inotify/server.py |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/inotify/server.py Sun Oct 12 15:21:08 2008 -0500 +++ b/hgext/inotify/server.py Sun Oct 12 15:21:08 2008 -0500 @@ -266,15 +266,14 @@ 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 @@ 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')