Mercurial > hg
comparison hgext/blackbox.py @ 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 | 59c135bb31bc |
children | 0ef40bb20264 |
comparison
equal
deleted
inserted
replaced
33188:54bc88c56ec8 | 33189:1df74b71396d |
---|---|
59 command = registrar.command(cmdtable) | 59 command = registrar.command(cmdtable) |
60 | 60 |
61 configtable = {} | 61 configtable = {} |
62 configitem = registrar.configitem(configtable) | 62 configitem = registrar.configitem(configtable) |
63 | 63 |
64 configitem('blackbox', 'dirty', | |
65 default=False, | |
66 ) | |
64 configitem('blackbox', 'maxsize', | 67 configitem('blackbox', 'maxsize', |
65 default='1 MB', | 68 default='1 MB', |
66 ) | 69 ) |
67 | 70 |
68 lastui = None | 71 lastui = None |
189 changed = '' | 192 changed = '' |
190 if ui._bbrepo: | 193 if ui._bbrepo: |
191 ctx = ui._bbrepo[None] | 194 ctx = ui._bbrepo[None] |
192 parents = ctx.parents() | 195 parents = ctx.parents() |
193 rev = ('+'.join([hex(p.node()) for p in parents])) | 196 rev = ('+'.join([hex(p.node()) for p in parents])) |
194 if (ui.configbool('blackbox', 'dirty', False) and ( | 197 if (ui.configbool('blackbox', 'dirty') and ( |
195 any(ui._bbrepo.status()) or | 198 any(ui._bbrepo.status()) or |
196 any(ctx.sub(s).dirty() for s in ctx.substate) | 199 any(ctx.sub(s).dirty() for s in ctx.substate) |
197 )): | 200 )): |
198 changed = '+' | 201 changed = '+' |
199 if ui.configbool('blackbox', 'logsource', False): | 202 if ui.configbool('blackbox', 'logsource', False): |