# HG changeset patch # User Yuya Nishihara # Date 1409281799 -7200 # Node ID 75e166b82c7ab376cc6a78797161d205129d1053 # Parent 186fd06283b4ddf44f9ac5ba3fb03a871f0994c5 annotate: remove redundant check for empty list of annotation data It isn't necessary because zip(*pieces) returns [] if pieces are empty, and pieces are empty only if lines are empty. diff -r 186fd06283b4 -r 75e166b82c7a mercurial/commands.py --- a/mercurial/commands.py Fri Sep 12 14:21:18 2014 -0700 +++ b/mercurial/commands.py Fri Aug 29 05:09:59 2014 +0200 @@ -323,12 +323,11 @@ pieces.append(["%s%s%s" % (sep, ' ' * (ml - w), x) for x, w in sized]) - if pieces: - for p, l in zip(zip(*pieces), lines): - ui.write("%s: %s" % ("".join(p), l[1])) - - if lines and not lines[-1][1].endswith('\n'): - ui.write('\n') + for p, l in zip(zip(*pieces), lines): + ui.write("%s: %s" % ("".join(p), l[1])) + + if lines and not lines[-1][1].endswith('\n'): + ui.write('\n') @command('archive', [('', 'no-decode', None, _('do not pass files through decoders')),