comparison 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
comparison
equal deleted inserted replaced
16610:f1745323a567 16612:726dd0fc7cfe
917 for tag, node in repo.branchtags().items()], 917 for tag, node in repo.branchtags().items()],
918 reverse=True) 918 reverse=True)
919 919
920 for isactive, node, tag in branches: 920 for isactive, node, tag in branches:
921 if (not active) or isactive: 921 if (not active) or isactive:
922 hn = repo.lookup(node)
923 if isactive:
924 label = 'branches.active'
925 notice = ''
926 elif hn not in repo.branchheads(tag, closed=False):
927 if not closed:
928 continue
929 label = 'branches.closed'
930 notice = _(' (closed)')
931 else:
932 label = 'branches.inactive'
933 notice = _(' (inactive)')
934 if tag == repo.dirstate.branch():
935 label = 'branches.current'
936 rev = str(node).rjust(31 - encoding.colwidth(tag))
937 rev = ui.label('%s:%s' % (rev, hexfunc(hn)), 'log.changeset')
938 tag = ui.label(tag, label)
922 if ui.quiet: 939 if ui.quiet:
923 ui.write("%s\n" % tag) 940 ui.write("%s\n" % tag)
924 else: 941 else:
925 hn = repo.lookup(node)
926 if isactive:
927 label = 'branches.active'
928 notice = ''
929 elif hn not in repo.branchheads(tag, closed=False):
930 if not closed:
931 continue
932 label = 'branches.closed'
933 notice = _(' (closed)')
934 else:
935 label = 'branches.inactive'
936 notice = _(' (inactive)')
937 if tag == repo.dirstate.branch():
938 label = 'branches.current'
939 rev = str(node).rjust(31 - encoding.colwidth(tag))
940 rev = ui.label('%s:%s' % (rev, hexfunc(hn)), 'log.changeset')
941 tag = ui.label(tag, label)
942 ui.write("%s %s%s\n" % (tag, rev, notice)) 942 ui.write("%s %s%s\n" % (tag, rev, notice))
943 943
944 @command('bundle', 944 @command('bundle',
945 [('f', 'force', None, _('run even when the destination is unrelated')), 945 [('f', 'force', None, _('run even when the destination is unrelated')),
946 ('r', 'rev', [], _('a changeset intended to be added to the destination'), 946 ('r', 'rev', [], _('a changeset intended to be added to the destination'),