Colorizing run-tests.py output

Angel Ezquerra angel.ezquerra at gmail.com
Sun Aug 31 05:14:37 CDT 2014


On Sun, Aug 31, 2014 at 10:23 AM, Augie Fackler <raf at durin42.com> wrote:
>
> On Aug 31, 2014, at 9:43 AM, Pierre-Yves David <pierre-yves.david at ens-lyon.org> wrote:
>
>>
>>
>> On 08/31/2014 12:10 AM, Angel Ezquerra wrote:
>>> Hi,
>>>
>>> today Kevin Bullock discovered and taught me a nice trick to colorize
>>> the output of run-tests.py. To do so you can use the --view flag of
>>> the run-tests script to tell it to use "git diff" to view the test
>>> results. To do so you can do:
>>>
>>> ./run-tests.py --view 'git diff --color --no-index' TESTFILE
>>>
>>> As a nice side effect, this also pages the run-tests output, and shows
>>> you the first difference (which is usually the most interesting one).
>>
>> That would be a an interresting feature to have natively. (I believe with have some diff colorisation code in mercurial itself)
>
> http://boredzo.org/diff-colorize/ is another option - you get word-level diff highlighting too.

I agree it would be nice to have this natively. Currently this
solution has one drawback: run-tests --view and --interactive do not
like each other. I think Greg is going to fix it soon though :-)

Angel


More information about the Mercurial-devel mailing list