[PATCH] dirstate.status: return explicit unknown files even when not asked

Augie Fackler raf at durin42.com
Wed Oct 16 09:27:20 CDT 2013


On Mon, Oct 14, 2013 at 01:09:32PM -0400, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0 at fb.com>
> # Date 1381724729 14400
> #      Mon Oct 14 00:25:29 2013 -0400
> # Node ID 419788cc0e5e889477786e4a4cae55b13819979a
> # Parent  7bdb049b996a7d909adb945558dedaebe51f164e
> dirstate.status: return explicit unknown files even when not asked

Queued this, thanks.

>
> dirstate.walk will return unknown files that were explicitly requested, even
> if listunknown is false. There's no point in dropping these files on the
> floor in dirstate.status.
>
> This has no effect on any current callers, because all of them assume the
> unknown list is empty and ignore it. Future callers may find it useful,
> though.
>
> diff -r 7bdb049b996a -r 419788cc0e5e mercurial/dirstate.py
> --- a/mercurial/dirstate.py	Fri Sep 20 14:57:19 2013 -0700
> +++ b/mercurial/dirstate.py	Mon Oct 14 00:25:29 2013 -0400
> @@ -815,7 +815,7 @@ class dirstate(object):
>                  if (listignored or mexact(fn)) and dirignore(fn):
>                      if listignored:
>                          iadd(fn)
> -                elif listunknown:
> +                else:
>                      uadd(fn)
>                  continue
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list