[BUG] hg log -v crashes

Maxim Dounin mdounin at mdounin.ru
Mon Feb 11 07:19:06 CST 2008


On Mon, Feb 11, 2008 at 12:55:01PM +0100, Guido Ostkamp wrote:

>On Mon, 11 Feb 2008 12:07:13 +0100, "Guido Ostkamp"
><hg at ostkamp.fastmail.fm> said:
>> Hello,
>> the 'hg log -v' command crashes here:
>I would like to add that I use my own .hg_style file which
>worked ok with older versions of Mercurial 
>(e.g. Mercurial Distributed SCM (version 3aa5c45874c6+20071105)).
>In .hgrc I have
>style = /home/ostkamp/.hg_style
>And in .hg_style (sorry, in case the line wrapping fails):
>changeset = 'changeset:  
>{author}\ndate:        {date|date}\nsummary:     {desc|firstline}\n\n'
>changeset_quiet = '{rev}:{node|short}\n'
>changeset_verbose = 'changeset:  

Reduced tescase:

hg log --template '{file_adds|strip}' -l1

And backtrace is reproducable with older versions too, but you 
have to specify --debug for this, since no file_adds exposed 
without --debug before 5a124ce4602a.

The problem is that 'strip' (and 'fill76' too, actually) only 
applicable to strings, while file_adds is a list. You should use 
'stringify' if you really need to do something with list as 
string, e.g.:

hg log --template '{file_adds|stringify|strip|fill76}' -l1

Maxim Dounin

More information about the Mercurial-devel mailing list