[PATCH 3 of 8] blackbox: simplify the dirty check
Matt Harbison
mharbison72 at gmail.com
Sun Jul 9 19:34:51 EDT 2017
# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1499574183 14400
# Sun Jul 09 00:23:03 2017 -0400
# Node ID fca94a77d9cac7b60a44444b152fcb42ddb4dd1a
# Parent 09a3c95bdd28d00bc0071a4ade1ab31cf61262b2
blackbox: simplify the dirty check
Same idea (and possibly incorrect behavior) as the previous commit.
diff --git a/hgext/blackbox.py b/hgext/blackbox.py
--- a/hgext/blackbox.py
+++ b/hgext/blackbox.py
@@ -197,10 +197,8 @@
ctx = ui._bbrepo[None]
parents = ctx.parents()
rev = ('+'.join([hex(p.node()) for p in parents]))
- if (ui.configbool('blackbox', 'dirty') and (
- any(ui._bbrepo.status()) or
- any(ctx.sub(s).dirty() for s in ctx.substate)
- )):
+ if (ui.configbool('blackbox', 'dirty') and
+ ctx.dirty(missing=True, merge=False, branch=False)):
changed = '+'
if ui.configbool('blackbox', 'logsource'):
src = ' [%s]' % event
More information about the Mercurial-devel
mailing list