Mercurial > public > mercurial-scm > hg-stable
diff hgext/blackbox.py @ 33191: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 | 59c135bb31bc |
children | 0ef40bb20264 |
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) )):