--- a/mercurial/dirstate.py Thu Oct 27 13:49:15 2005 -0700
+++ b/mercurial/dirstate.py Fri Oct 28 10:57:40 2005 -0700
@@ -11,7 +11,7 @@
from node import *
from i18n import gettext as _
from demandload import *
-demandload(globals(), "time bisect stat util re")
+demandload(globals(), "time bisect stat util re errno")
class dirstate:
def __init__(self, opener, ui, root):
@@ -372,11 +372,16 @@
except KeyError:
unknown.append(fn)
continue
- # XXX: what to do with file no longer present in the fs
- # who are not removed in the dirstate ?
- if src == 'm' and not type == 'r':
- deleted.append(fn)
- continue
+ if src == 'm':
+ try:
+ st = os.stat(fn)
+ except OSError, inst:
+ # XXX: what to do with file no longer present in the fs
+ # who are not removed in the dirstate ?
+ if inst.errno != errno.ENOENT:
+ raise
+ deleted.append(fn)
+ continue
# check the common case first
if type == 'n':
if not st: