Mercurial > hg
changeset 28304:6b38888ab033
blackbox: remove hexfn
It was introduced as copy+paste code, but was never necessary.
author | timeless <timeless@mozdev.org> |
---|---|
date | Tue, 01 Mar 2016 10:45:47 +0000 |
parents | ce24de063aa5 |
children | f5ae291dfedf |
files | hgext/blackbox.py |
diffstat | 1 files changed, 7 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/blackbox.py Tue Mar 01 10:43:52 2016 +0000 +++ b/hgext/blackbox.py Tue Mar 01 10:45:47 2016 +0000 @@ -71,12 +71,6 @@ del filehandles[path] fp.close() -def hexfn(node): - if node is None: - return None - else: - return hex(node) - def wrapui(ui): class blackboxui(ui.__class__): def __init__(self, src=None): @@ -173,16 +167,13 @@ changed = '' if ui._bbrepo: ctx = ui._bbrepo[None] - if ctx.rev() is not None: - rev = hexfn(ctx.node()) - else: - parents = ctx.parents() - rev = ('+'.join([hexfn(p.node()) for p in parents])) - if (ui.configbool('blackbox', 'dirty', False) and ( - any(ui._bbrepo.status()) or - any(ctx.sub(s).dirty() for s in ctx.substate) - )): - changed = '+' + parents = ctx.parents() + rev = ('+'.join([hex(p.node()) for p in parents])) + if (ui.configbool('blackbox', 'dirty', False) and ( + any(ui._bbrepo.status()) or + any(ctx.sub(s).dirty() for s in ctx.substate) + )): + changed = '+' try: ui._bbwrite('%s %s @%s%s (%s)> %s', date, user, rev, changed, pid, formattedmsg)