Mercurial > hg
changeset 1476:17e8c70fb670
fix dirstate.change: it should walk ignored files
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Fri, 28 Oct 2005 10:57:40 -0700 |
parents | d791c335fb7b |
children | d3566eda2bcb |
files | mercurial/dirstate.py |
diffstat | 1 files changed, 11 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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: