configitems: register the 'blackbox.dirty' config
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 30 Jun 2017 03:28:11 +0200
changeset 33189 1df74b71396d
parent 33188 54bc88c56ec8
child 33190 0ef40bb20264
configitems: register the 'blackbox.dirty' config
hgext/blackbox.py
--- 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)
                     )):