[PATCH] annotate: append newline after non newline-terminated file listings

Matt Mackall mpm at selenic.com
Mon Jan 9 18:49:16 CST 2012


On Mon, 2012-01-09 at 00:27 +0200, Ion Savin wrote:
> # HG changeset patch
> # User Ion Savin <comp_ at gmx.net>
> # Date 1326061171 -7200
> # Node ID afadfd2e74bf5325aa115710c728f425e6b9cd96
> # Parent  f15c646bffc7187c357f3dcc12761513c1ed6609
> 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.


> +            if not lines[-1][1].endswith('\n'):
> +                ui.write('\n')

I bet this breaks if there are zero lines.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list