Patchwork [13,of,18] configitems: register the 'blackbox.dirty' config

login
register
mail settings
Submitter Pierre-Yves David
Date July 2, 2017, 2:57 a.m.
Message ID <3a585e4adc11e1ac54fe.1498964261@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21903/
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 1498786091 -7200
#      Fri Jun 30 03:28:11 2017 +0200
# Node ID 3a585e4adc11e1ac54fe96b8b336031a43ecd130
# Parent  6d678ab1b10d0fddc73003d21aa3c7ec43194e2e
# 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 3a585e4adc11
configitems: register the 'blackbox.dirty' config

Patch

diff --git a/hgext/blackbox.py b/hgext/blackbox.py
--- a/hgext/blackbox.py
+++ b/hgext/blackbox.py
@@ -61,6 +61,9 @@  command = registrar.command(cmdtable)
 configtable = {}
 configitem = registrar.configitem(configtable)
 
+configitem('blackbox', 'dirty',
+    default=False,
+)
 configitem('blackbox', 'maxsize',
     default='1 MB',
 )
@@ -191,7 +194,7 @@  def wrapui(ui):
                     ctx = ui._bbrepo[None]
                     parents = ctx.parents()
                     rev = ('+'.join([hex(p.node()) for p in parents]))
-                    if (ui.configbool('blackbox', 'dirty', False) and (
+                    if (ui.configbool('blackbox', 'dirty') and (
                         any(ui._bbrepo.status()) or
                         any(ctx.sub(s).dirty() for s in ctx.substate)
                     )):