Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 16612:726dd0fc7cfe
branches: quiet option observes other parameters
author | Travis Herrick <tthetoad@gmail.com> |
---|---|
date | Sun, 06 May 2012 17:12:22 -0700 |
parents | ddd4996740c7 |
children | 5cf18921bb7b |
line wrap: on
line diff
--- a/mercurial/commands.py Wed May 09 02:46:58 2012 +0300 +++ b/mercurial/commands.py Sun May 06 17:12:22 2012 -0700 @@ -919,26 +919,26 @@ for isactive, node, tag in branches: if (not active) or isactive: + hn = repo.lookup(node) + if isactive: + label = 'branches.active' + notice = '' + elif hn not in repo.branchheads(tag, closed=False): + if not closed: + continue + label = 'branches.closed' + notice = _(' (closed)') + else: + label = 'branches.inactive' + notice = _(' (inactive)') + if tag == repo.dirstate.branch(): + label = 'branches.current' + rev = str(node).rjust(31 - encoding.colwidth(tag)) + rev = ui.label('%s:%s' % (rev, hexfunc(hn)), 'log.changeset') + tag = ui.label(tag, label) if ui.quiet: ui.write("%s\n" % tag) else: - hn = repo.lookup(node) - if isactive: - label = 'branches.active' - notice = '' - elif hn not in repo.branchheads(tag, closed=False): - if not closed: - continue - label = 'branches.closed' - notice = _(' (closed)') - else: - label = 'branches.inactive' - notice = _(' (inactive)') - if tag == repo.dirstate.branch(): - label = 'branches.current' - rev = str(node).rjust(31 - encoding.colwidth(tag)) - rev = ui.label('%s:%s' % (rev, hexfunc(hn)), 'log.changeset') - tag = ui.label(tag, label) ui.write("%s %s%s\n" % (tag, rev, notice)) @command('bundle',