[PATCH 2 of 2] dirstate.status: list interesting files whenever possible

Augie Fackler raf at durin42.com
Sat May 11 20:28:45 CDT 2013


On May 10, 2013, at 2:17 AM, Siddharth Agarwal <sid0 at fb.com> wrote:

> # HG changeset patch
> # User Siddharth Agarwal <sid0 at fb.com>
> # Date 1366751793 25200
> #      Tue Apr 23 14:16:33 2013 -0700
> # Node ID d162c44e829b4a889022f8752aa1e23e2e4070f2
> # Parent  ed4040d92e56cd7a963f896f72bcf55922449171
> dirstate.status: list interesting files whenever possible

wording nit: limit list to interesting files when possible

(so it's clear that listing interesting files is less than everything, which wasn't obvious in my brain)

> 
> diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
> --- a/mercurial/dirstate.py
> +++ b/mercurial/dirstate.py
> @@ -810,8 +810,13 @@
> 
>         lnkkind = stat.S_IFLNK
> 
> -        for fn, st in self.walk(match, subrepos, listunknown,
> -                                listignored).iteritems():
> +        # We can't only list interesting files when:
> +        # - we're listing all clean files
> +        # - match.traversedir does something, because match.traversedir should
> +        #   be called for every dir in the working dir
> +        interesting = not listclean and match.traversedir is None
> +        for fn, st in self.walk(match, subrepos, listunknown, listignored,
> +                                interesting=interesting).iteritems():
>             if fn not in dmap:
>                 if (listignored or mexact(fn)) and dirignore(fn):
>                     if listignored:
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel



More information about the Mercurial-devel mailing list