On Mon, 29 Aug 2016 12:52:42 -0500, Mathias De Maré wrote:
> # HG changeset patch
> # User Mathias De Maré <mathias.dem...@gmail.com>
> # Date 1472483949 -7200
> #      Mon Aug 29 17:19:09 2016 +0200
> # Node ID e348c87b33d73a590bee53b74def915b1ce8c6fe
> # Parent  fb88d0c87c2746bd84983f1005ed83276c6e9c68
> formatter: add specific check for plain formatting
> 
> diff --git a/mercurial/formatter.py b/mercurial/formatter.py
> --- a/mercurial/formatter.py
> +++ b/mercurial/formatter.py
> @@ -91,6 +91,9 @@
>      def plain(self, text, **opts):
>          '''show raw text for non-templated mode'''
>          pass
> +    def isplain(self):
> +        '''check for plain formatter usage'''
> +        return False

I like this, but there's bool(fm), which equals to "not fm.isplain()". Can
you replace all fm.__nonzero__() calls by fm.isplain() ?
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to