[PATCH 3 of 4 V2] diff: invoke the file prefetch hook

Yuya Nishihara yuya at tcha.org
Tue Apr 17 07:34:25 EDT 2018


On Mon, 16 Apr 2018 15:07:11 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1523751087 14400
> #      Sat Apr 14 20:11:27 2018 -0400
> # Node ID 317c4321147ef610a2f229dd87953829d7eebf3d
> # Parent  c44d4efe94b05253d30bb507dd4cca70ad1d94f0
> diff: invoke the file prefetch hook
> 
> By invoking it this deep within the command, we pick up both subrepo and hgweb
> support, as well as --patch support for commands that implement logopts.
> 
> diff --git a/mercurial/patch.py b/mercurial/patch.py
> --- a/mercurial/patch.py
> +++ b/mercurial/patch.py
> @@ -2466,6 +2466,10 @@ def diffhunks(repo, node1=None, node2=No
>              # reported as copies. We want to show them in the diff as additions.
>              del copy[dst]
>  
> +    prefetchmatch = scmutil.matchfiles(repo,
> +                            [f for f in modifiedset | addedset | removedset])

Nit: just list(...). Fixed in flight.


More information about the Mercurial-devel mailing list