[PATCH STABLE] keyword: use fctx.filenode() instead of internal var (issue5364)

Yuya Nishihara yuya at tcha.org
Fri Sep 9 08:50:31 EDT 2016


On Thu, 08 Sep 2016 17:12:34 +0100, Christian Ebert wrote:
> # HG changeset patch
> # User Christian Ebert <blacktrash at gmx.net>
> # Date 1473350741 -3600
> #      Thu Sep 08 17:05:41 2016 +0100
> # Branch stable
> # Node ID d4f2b7b5b2e382dcc34409ddcb89b9280262c2d0
> # Parent  e7766022a61a66a7c4218526b647f96bd442a4ce
> keyword: use fctx.filenode() instead of internal var (issue5364)
> 
> I caved in to the proposal to use internal _filenode variable:
> https://www.mercurial-scm.org/pipermail/mercurial-devel/2010-October/025237.html

Ah, I got the point why internal _filenode was preferred. I think Nicolas
was right. Since kwfilectx_cmp() heavily depends on the internal of the filectx,
using _filenode would catch more bugs.

> --- a/hgext/keyword.py
> +++ b/hgext/keyword.py
> @@ -739,7 +739,7 @@ def reposetup(ui, repo):
>      def kwfilectx_cmp(orig, self, fctx):

Maybe we'll have to handle _customcmp instead?

https://selenic.com/repo/hg/log?rev=bd19561b98d9%3A%3A7b038ec6c5fd


More information about the Mercurial-devel mailing list