# HG changeset patch # User Pierre-Yves David # Date 2017-06-30 01:28:11 # Node ID 1df74b71396dac830952c0abc31047618203a01f # Parent 54bc88c56ec87da0af0b6adfd3ab439d6eacafeb configitems: register the 'blackbox.dirty' config 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) )):