changeset 33189:1df74b71396d

configitems: register the 'blackbox.dirty' config
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 30 Jun 2017 03:28:11 +0200
parents 54bc88c56ec8
children 0ef40bb20264
files hgext/blackbox.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/blackbox.py	Fri Jun 30 03:27:24 2017 +0200
+++ b/hgext/blackbox.py	Fri Jun 30 03:28:11 2017 +0200
@@ -61,6 +61,9 @@
 configtable = {}
 configitem = registrar.configitem(configtable)
 
+configitem('blackbox', 'dirty',
+    default=False,
+)
 configitem('blackbox', 'maxsize',
     default='1 MB',
 )
@@ -191,7 +194,7 @@
                     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)
                     )):