Patchwork [2,of,2] configitems: fixup default value of diff config option

login
register
mail settings
Submitter Boris Feld
Date Oct. 16, 2017, 10:17 a.m.
Message ID <596df3e78d9c2670f00e.1508149036@FB>
Download mbox | patch
Permalink /patch/24972/
State Accepted
Headers show

Comments

Boris Feld - Oct. 16, 2017, 10:17 a.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1507925335 -7200
#      Fri Oct 13 22:08:55 2017 +0200
# Node ID 596df3e78d9c2670f00ea3a0b9870b0fced57deb
# Parent  b3b1e118238d5897da17c41e66a1ce46ebc8096b
# EXP-Topic config.register.fixup
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 596df3e78d9c
configitems: fixup default value of diff config option


It turned out that configbool is used for most of them so the registered
default value was wrong.
Yuya Nishihara - Oct. 16, 2017, 12:51 p.m.
On Mon, 16 Oct 2017 12:17:16 +0200, Boris Feld wrote:
> # HG changeset patch
> # User Boris Feld <boris.feld@octobus.net>
> # Date 1507925335 -7200
> #      Fri Oct 13 22:08:55 2017 +0200
> # Node ID 596df3e78d9c2670f00ea3a0b9870b0fced57deb
> # Parent  b3b1e118238d5897da17c41e66a1ce46ebc8096b
> # EXP-Topic config.register.fixup
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 596df3e78d9c
> configitems: fixup default value of diff config option

Queued, thanks.

>  coreconfigitem('diff', 'nodates',
> -    default=None,
> +    default=False,

Perhaps, ('annotate', *) would need the same fix.
Boris Feld - Oct. 16, 2017, 1:11 p.m.
On Mon, 2017-10-16 at 21:51 +0900, Yuya Nishihara wrote:
> On Mon, 16 Oct 2017 12:17:16 +0200, Boris Feld wrote:
> > # HG changeset patch
> > # User Boris Feld <boris.feld@octobus.net>
> > # Date 1507925335 -7200
> > #      Fri Oct 13 22:08:55 2017 +0200
> > # Node ID 596df3e78d9c2670f00ea3a0b9870b0fced57deb
> > # Parent  b3b1e118238d5897da17c41e66a1ce46ebc8096b
> > # EXP-Topic config.register.fixup
> > # Available At https://bitbucket.org/octobus/mercurial-devel/
> > #              hg pull https://bitbucket.org/octobus/mercurial-deve
> > l/ -r 596df3e78d9c
> > configitems: fixup default value of diff config option
> 
> Queued, thanks.
> 
> >  coreconfigitem('diff', 'nodates',
> > -    default=None,
> > +    default=False,
> 
> Perhaps, ('annotate', *) would need the same fix.

Right! I will send a follow-up.

Patch

diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -248,34 +248,34 @@ 
     default=None,
 )
 coreconfigitem('diff', 'nodates',
-    default=None,
+    default=False,
 )
 coreconfigitem('diff', 'showfunc',
-    default=None,
+    default=False,
 )
 coreconfigitem('diff', 'unified',
     default=None,
 )
 coreconfigitem('diff', 'git',
-    default=None,
+    default=False,
 )
 coreconfigitem('diff', 'ignorews',
-    default=None,
+    default=False,
 )
 coreconfigitem('diff', 'ignorewsamount',
-    default=None,
+    default=False,
 )
 coreconfigitem('diff', 'ignoreblanklines',
-    default=None,
+    default=False,
 )
 coreconfigitem('diff', 'ignorewseol',
-    default=None,
+    default=False,
 )
 coreconfigitem('diff', 'nobinary',
-    default=None,
+    default=False,
 )
 coreconfigitem('diff', 'noprefix',
-    default=None,
+    default=False,
 )
 coreconfigitem('email', 'bcc',
     default=None,