[PATCH] Fix Issue 1371: INotify server raising an error when removing a file
Gerard Korsten
soonkia77 at gmail.com
Fri Oct 31 21:53:19 CDT 2008
# HG changeset patch
# User Gerard Korsten <soonkia77 at gmail.com>
# Date 1225507547 -7200
# Node ID 2027a016ac16d5759dbaf882b1dfb71ce1aedd3c
# Parent b1981315fafdd12788ab9ea5e7980b6c45826fad
Fix Issue 1371: INotify server raising an error when removing a file
When a file is deleted via hg rm <file> the dirstate is updated marks the
file with a status of 'r'. INotify server.py tries to do a stat on the file
after it's been removed. Just added a check for the status
diff --git a/hgext/inotify/server.py b/hgext/inotify/server.py
--- a/hgext/inotify/server.py
+++ b/hgext/inotify/server.py
@@ -338,7 +338,9 @@
if not wfn.startswith(wtopdir):
continue
status = state[0]
- st = self.stat(wfn)
+ st=None
+ if not status=='r':
+ st = self.stat(wfn)
if status == 'r' and not st:
self.updatestatus(wfn, st, status=status)
else:
More information about the Mercurial-devel
mailing list