[PATCH] keyword: handle filectx _customcmp

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Oct 17 18:27:21 EDT 2016



On 10/17/2016 05:52 PM, Christian Ebert wrote:
> # HG changeset patch
> # User Christian Ebert <blacktrash at gmx.net>
> # Date 1476718966 -7200
> #      Mon Oct 17 17:42:46 2016 +0200
> # Node ID ebef6b5593fa812e907fb4dae920a0c8b2ee00a0
> # Parent  b85fa6bf298be07804a74d8fdec0d19fdbc6d740
> keyword: handle filectx _customcmp

I'm not sure why this is an improvement. Can you elaborate on what this 
changes do and why this is the way to go ?

Adding a test case to show what it fixes would be helpful.

> Related to issue5364.
>
> diff --git a/hgext/keyword.py b/hgext/keyword.py
> --- a/hgext/keyword.py
> +++ b/hgext/keyword.py
> @@ -737,6 +737,8 @@ def reposetup(ui, repo):
>              return ret
>
>      def kwfilectx_cmp(orig, self, fctx):
> +        if fctx._customcmp:
> +            return fctx.cmp(self)
>          # keyword affects data size, comparing wdir and filelog size does
>          # not make sense
>          if (fctx._filenode is None and

Cheers,

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list