[PATCH] add: only retrieve from dirstate.walk files that were not removed

Matt Mackall mpm at selenic.com
Mon Dec 14 11:53:36 CST 2009


On Mon, 2009-12-14 at 19:00 +0900, Nicolas Dumazet wrote:
> +    def walk(self, match, removed=True):
> +        files = self._repo.dirstate.walk(match, True, False)
> +        if removed:
> +            return sorted(files)
> +        else:
> +            return sorted(k for k,v in files.iteritems() if v is not None)

I'm guessing this swallows missing in addition to removed files, which
is wrong. Perhaps something like:

d = self._repo.distate.__getitem__
return ... if d(v) != 'r'...

-- 
http://selenic.com : development and support for Mercurial and Linux




More information about the Mercurial-devel mailing list