[PATCH 1 of 2] patch: exclude diff opt from difffeatureopts by setting to false

liscju piotr.listkiewicz at gmail.com
Tue Apr 19 17:22:36 UTC 2016


# HG changeset patch
# User liscju <piotr.listkiewicz at gmail.com>
# Date 1461079954 -7200
#      Tue Apr 19 17:32:34 2016 +0200
# Branch stable
# Node ID d528ea7502ab7fc0ef01d3a8a44dc78df8d73563
# Parent  97811ff7964710d32cae951df1da8019b46151a2
patch: exclude diff opt from difffeatureopts by setting to false

Before difffeatureopts changed diff option from opts parameter
only if it was true, so there was no way to make diff option false.

diff -r 97811ff79647 -r d528ea7502ab mercurial/patch.py
--- a/mercurial/patch.py	Sat Mar 26 18:50:56 2016 +0900
+++ b/mercurial/patch.py	Tue Apr 19 17:32:34 2016 +0200
@@ -2143,7 +2143,7 @@ def difffeatureopts(ui, opts=None, untru
     def get(key, name=None, getter=ui.configbool, forceplain=None):
         if opts:
             v = opts.get(key)
-            if v:
+            if v or isinstance(v, bool):
                 return v
         if forceplain is not None and ui.plain():
             return forceplain


More information about the Mercurial-devel mailing list