comparison hgext/blackbox.py @ 33361:66fe60d5f291

blackbox: simplify the dirty check Same idea (and possibly incorrect behavior) as the previous commit.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 09 Jul 2017 00:23:03 -0400
parents 0ef40bb20264
children 9bb4decd43b0
comparison
equal deleted inserted replaced
33360:4a70985805c6 33361:66fe60d5f291
195 changed = '' 195 changed = ''
196 if ui._bbrepo: 196 if ui._bbrepo:
197 ctx = ui._bbrepo[None] 197 ctx = ui._bbrepo[None]
198 parents = ctx.parents() 198 parents = ctx.parents()
199 rev = ('+'.join([hex(p.node()) for p in parents])) 199 rev = ('+'.join([hex(p.node()) for p in parents]))
200 if (ui.configbool('blackbox', 'dirty') and ( 200 if (ui.configbool('blackbox', 'dirty') and
201 any(ui._bbrepo.status()) or 201 ctx.dirty(missing=True, merge=False, branch=False)):
202 any(ctx.sub(s).dirty() for s in ctx.substate)
203 )):
204 changed = '+' 202 changed = '+'
205 if ui.configbool('blackbox', 'logsource'): 203 if ui.configbool('blackbox', 'logsource'):
206 src = ' [%s]' % event 204 src = ' [%s]' % event
207 else: 205 else:
208 src = '' 206 src = ''