[PATCH 3 of 8] Add filesystem path to dirstate.statwalk return value

Matt Mackall mpm at selenic.com
Thu May 1 13:14:41 CDT 2008

On Wed, 2008-04-30 at 18:37 +0100, Paul Moore wrote:
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -31,7 +31,7 @@
>      rejected = None
>      exacts = {}
>      names = []
> -    for src, abs, rel, exact in cmdutil.walk(repo, pats, opts,
> +    for src, abs, fsabs, rel, exact in cmdutil.walk(repo, pats, opts,
>                                               badmatch=util.always):

Guess what? I've always thought this pattern of passing a ton of
arguments and getting back a ton of results was horrible, so I've been
working on changing it. This pattern now looks like this in my repo:

m = cmdutil.match(repo, pats, opts)
for abs in repo.walk(m):
    if m.exact(abs):

..so I'm afraid this is an untimely step in the wrong direction.

Also, I think it's probably a mistake to return both abs and fsabs
anyway. It seems if we're walking the filesystem, we should only return
the case on the filesystem and if we're walking the manifest, we should
only return the case we find there.

Mathematics is the supreme nostalgia of our time.

More information about the Mercurial-devel mailing list