Patchwork [02,of,13,config] configitems: register the 'notify.diffstat' config

login
register
mail settings
Submitter Boris Feld
Date Aug. 11, 2017, 1:23 p.m.
Message ID <0980f220e3d3e8d6737d.1502457799@FB>
Download mbox | patch
Permalink /patch/22872/
State Accepted
Headers show

Comments

Boris Feld - Aug. 11, 2017, 1:23 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1498786999 -7200
#      Fri Jun 30 03:43:19 2017 +0200
# Node ID 0980f220e3d3e8d6737d2a8c7b468491b0e1cd52
# Parent  f60ab18ff3fd401c460755b77001a9fa1bbf6977
# EXP-Topic config.register.notify
configitems: register the 'notify.diffstat' config

Patch

diff -r f60ab18ff3fd -r 0980f220e3d3 hgext/notify.py
--- a/hgext/notify.py	Fri Jun 30 03:43:18 2017 +0200
+++ b/hgext/notify.py	Fri Jun 30 03:43:19 2017 +0200
@@ -161,6 +161,9 @@ 
 configitem('notify', 'config',
     default=None,
 )
+configitem('notify', 'diffstat',
+    default=True,
+)
 
 # template for single changeset can include email headers.
 single_template = '''
@@ -368,7 +371,7 @@ 
                             opts=patch.diffallopts(self.ui))
         difflines = ''.join(chunks).splitlines()
 
-        if self.ui.configbool('notify', 'diffstat', True):
+        if self.ui.configbool('notify', 'diffstat'):
             s = patch.diffstat(difflines)
             # s may be nil, don't include the header if it is
             if s: