[PATCH 1 of 4 V3] hgweb: code selection without line numbers in file code view

Matt Mackall mpm at selenic.com
Sat Jun 1 16:26:15 CDT 2013


On Sat, 2013-06-01 at 22:09 +0400, Alexander Plavin wrote:
> # HG changeset patch
> # User Alexander Plavin <me at aplavin.ru>
> # Date 1369988709 -14400
> #      Fri May 31 12:25:09 2013 +0400
> # Node ID 39a32bcfb6581479afb5afc761e8ebcf5f41fbc2
> # Parent  1bef6f99a12d9062e737bb623da627719a3987e6
> hgweb: code selection without line numbers in file code view
> 
> File code is presented as HTML ordered list, so that line numbers
> are not selected with the code itself.
> Long lines are being wrapped for convenience.
> 
> diff -r 1bef6f99a12d -r 39a32bcfb658 mercurial/templatefilters.py
> --- a/mercurial/templatefilters.py	Thu May 23 17:53:38 2013 -0500
> +++ b/mercurial/templatefilters.py	Fri May 31 12:25:09 2013 +0400
> @@ -299,6 +299,9 @@
>      """:shortdate: Date. Returns a date like "2006-09-18"."""
>      return util.shortdate(text)
>  
> +def spaceifempty(text):
> +    return text or ' '

a) the template language has if()
b) it's not clear why this hack is needed
c) this is three or four patches

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list