comparison mercurial/commands.py @ 15829:2c480532f36e

annotate: append newline after non newline-terminated file listings The last line of a non newline-terminated file would mix with the first line of the next file in multiple-file listings before this patch. Possible compatibility issue: no longer possible to tell from the annotate output if the file is terminated by new line or not.
author Ion Savin <ion.savin@tora.com>
date Tue, 10 Jan 2012 10:18:19 +0200
parents 713ee57f817b
children 8ed112ed774a
comparison
equal deleted inserted replaced
15828:4bc715f2a356 15829:2c480532f36e
296 for x, w in sized]) 296 for x, w in sized])
297 297
298 if pieces: 298 if pieces:
299 for p, l in zip(zip(*pieces), lines): 299 for p, l in zip(zip(*pieces), lines):
300 ui.write("%s: %s" % ("".join(p), l[1])) 300 ui.write("%s: %s" % ("".join(p), l[1]))
301
302 if lines and not lines[-1][1].endswith('\n'):
303 ui.write('\n')
301 304
302 @command('archive', 305 @command('archive',
303 [('', 'no-decode', None, _('do not pass files through decoders')), 306 [('', 'no-decode', None, _('do not pass files through decoders')),
304 ('p', 'prefix', '', _('directory prefix for files in archive'), 307 ('p', 'prefix', '', _('directory prefix for files in archive'),
305 _('PREFIX')), 308 _('PREFIX')),