[PATCH 1 of 3] log: use an exact matcher for --patch --follow
Siddharth Agarwal
sid at less-broken.com
Sun Jul 13 01:51:54 UTC 2014
On 07/12/2014 06:41 PM, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0 at fb.com>
> # Date 1405215078 25200
> # Sat Jul 12 18:31:18 2014 -0700
> # Node ID 6ba1d8cf21e5dfc86c05b9eb856d99831eeb720b
> # Parent 0541680b3ed0f7068efcd2baa7696d2d07740605
> log: use an exact matcher for --patch --follow
These patches are logically independent of, but I wrote them on top of,
my earlier patch "log: make --patch --follow work inside a subdirectory".
>
> The arguments to log --patch --follow are expected to be exact paths.
>
> This will be used to make manifest filtering for these cases more efficient in
> upcoming patches.
>
> diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
> --- a/mercurial/cmdutil.py
> +++ b/mercurial/cmdutil.py
> @@ -1499,7 +1499,6 @@
> fcache = {}
> fcacheready = [False]
> pctx = repo['.']
> - wctx = repo[None]
>
> def populate():
> for fn in files:
> @@ -1512,7 +1511,7 @@
> # Lazy initialization
> fcacheready[0] = True
> populate()
> - return scmutil.match(wctx, fcache.get(rev, []), default='path')
> + return scmutil.matchfiles(repo, fcache.get(rev, []))
>
> return filematcher
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list