[PATCH] Limit line length of convert log messages
Frank Kingswood
frank at kingswood-consulting.co.uk
Thu Apr 10 12:04:23 UTC 2008
Patrick Mézard wrote:
>> diff -r 0231f763ebc8 -r e1fd124dd347 hgext/convert/convcmd.py
>> --- a/hgext/convert/convcmd.py Wed Mar 26 10:12:10 2008 -0700
>> +++ b/hgext/convert/convcmd.py Wed Mar 26 21:13:07 2008 +0000
>> @@ -290,7 +290,7 @@ class converter(object):
>> # convert log message to local encoding without using
>> # tolocal() because util._encoding conver() use it as
>> # 'utf-8'
>> - self.ui.status("%d %s\n" % (num, recode(desc)))
>> + self.ui.status(util.ellipsis("%d %s\n" % (num, recode(desc)),80))
>
> I am not really motivated by this change, but at least you want the '\n' outside the util.ellipsis() call.
I agree on the \n, my current code has something like
self.ui.status(util.ellipsis("%d %s" % (num, recode(desc)),80)+"\n")
Clearly the messages are there just to show that something is happening,
so accuracy isn't needed here. I'm using a function that was intended to
help generate shortened output just like this. Some messages I've seen
are long enough to cover half a screenful, not very useful.
Frank
More information about the Mercurial-devel
mailing list