[PATCH 2 of 5] test-revert: don't unnecessarily pipe through 'cat'

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Nov 3 11:04:52 CST 2014



On 11/03/2014 05:00 PM, Matt Mackall wrote:
> On Sun, 2014-11-02 at 22:45 +0000, Pierre-Yves David wrote:
>>
>> On 11/02/2014 10:19 PM, Martin von Zweigbergk wrote:
>>> # HG changeset patch
>>> # User Martin von Zweigbergk <martinvonz at google.com>
>>> # Date 1413682221 25200
>>> #      Sat Oct 18 18:30:21 2014 -0700
>>> # Branch stable
>>> # Node ID 9439327a222474b6af32ed9f717bfce81f90e53b
>>> # Parent  5df55ad6918a76870695dfe855168309bb5da27c
>>> test-revert: don't unnecessarily pipe through 'cat'
>>>
>>> diff --git a/tests/test-revert.t b/tests/test-revert.t
>>> --- a/tests/test-revert.t
>>> +++ b/tests/test-revert.t
>>> @@ -730,7 +730,7 @@
>>>
>>>    Setup working directory
>>>
>>> -  $ python ../gen-revert-cases.py wc | cat
>>> +  $ python ../gen-revert-cases.py wc
>>>      $ hg addremove --similarity 0
>>>      removing added_removed
>>>      removing added_revert
>>
>>
>> check-code says hi:
>>
>>      Skipping mercurial/httpclient/socketutil.py it has no-che?k-code (glob)
>> +  tests/test-revert.t:733:
>> +   >   $ python ../gen-revert-cases.py wc
>> +   filter wc output
>> +  [1]
>
> $ hg blame test-revert.t | grep "| cat"
> pierre-yves:   $ python ../gen-revert-cases.py wc | cat
>
> Ahem.

The question was about why we catch the wc binary in test. I think mads 
give a insighful reply

> http://mercurial.selenic.com/wiki/WritingTests#wc

And this adds some more.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list