Patchwork [14,of,18] configitems: register the 'blackbox.logsource' config

login
register
mail settings
Submitter Pierre-Yves David
Date July 2, 2017, 2:57 a.m.
Message ID <d153868fdbb77e46ca21.1498964262@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21905/
State Accepted
Headers show

Comments

Pierre-Yves David - July 2, 2017, 2:57 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1498786098 -7200
#      Fri Jun 30 03:28:18 2017 +0200
# Node ID d153868fdbb77e46ca2157d9b012f852e64e55a3
# Parent  3a585e4adc11e1ac54fe96b8b336031a43ecd130
# EXP-Topic config.register.blackbox
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r d153868fdbb7
configitems: register the 'blackbox.logsource' config

Patch

diff --git a/hgext/blackbox.py b/hgext/blackbox.py
--- a/hgext/blackbox.py
+++ b/hgext/blackbox.py
@@ -67,6 +67,9 @@  configitem('blackbox', 'dirty',
 configitem('blackbox', 'maxsize',
     default='1 MB',
 )
+configitem('blackbox', 'logsource',
+    default=False,
+)
 
 lastui = None
 
@@ -199,7 +202,7 @@  def wrapui(ui):
                         any(ctx.sub(s).dirty() for s in ctx.substate)
                     )):
                         changed = '+'
-                if ui.configbool('blackbox', 'logsource', False):
+                if ui.configbool('blackbox', 'logsource'):
                     src = ' [%s]' % event
                 else:
                     src = ''