Mercurial > hg
changeset 13581:b30a488762e1 stable
eol: use dirstate methods to clear dirstate
This fixes a race that was observed when status was called before and
after clearing the dirstate.
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Sat, 12 Mar 2011 12:11:09 +0100 |
parents | 8e94a1b4e9a4 |
children | e42d18538e1d |
files | hgext/eol.py |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/eol.py Thu Mar 10 11:30:38 2011 -0600 +++ b/hgext/eol.py Sat Mar 12 12:11:09 2011 +0100 @@ -260,13 +260,15 @@ if eolmtime > cachemtime: ui.debug("eol: detected change in .hgeol\n") - # TODO: we could introduce a method for this in dirstate. wlock = None try: wlock = self.wlock() - for f, e in self.dirstate._map.iteritems(): - self.dirstate._map[f] = (e[0], e[1], -1, 0) - self.dirstate._dirty = True + for f in self.dirstate: + if self.dirstate[f] == 'n': + # all normal files need to be looked at + # again since the new .hgeol file might no + # longer match a file it matched before + self.dirstate.normallookup(f) # Touch the cache to update mtime. self.opener("eol.cache", "w").close() wlock.release()