Patchwork [stable] tests: pass only one file at a time to tail(1)

login
register
mail settings
Submitter Augie Fackler
Date April 23, 2017, 1:38 p.m.
Message ID <6db2667e46e8831772e3.1492954702@imladris.local>
Download mbox | patch
Permalink /patch/20282/
State Accepted
Headers show

Comments

Augie Fackler - April 23, 2017, 1:38 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1492954690 14400
#      Sun Apr 23 09:38:10 2017 -0400
# Branch stable
# Node ID 6db2667e46e8831772e38639088e39932355336e
# Parent  f82cdd5ee57e468c3801cd340691e9b2497a49b2
tests: pass only one file at a time to tail(1)

It looks like the verison on Solaris only tails one file at a time.
Yuya Nishihara - April 23, 2017, 1:58 p.m.
On Sun, 23 Apr 2017 09:38:22 -0400, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1492954690 14400
> #      Sun Apr 23 09:38:10 2017 -0400
> # Branch stable
> # Node ID 6db2667e46e8831772e38639088e39932355336e
> # Parent  f82cdd5ee57e468c3801cd340691e9b2497a49b2
> tests: pass only one file at a time to tail(1)

Queued, thanks.
Danek Duvall - April 23, 2017, 2:53 p.m.
Augie Fackler wrote:

> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1492954690 14400
> #      Sun Apr 23 09:38:10 2017 -0400
> # Branch stable
> # Node ID 6db2667e46e8831772e38639088e39932355336e
> # Parent  f82cdd5ee57e468c3801cd340691e9b2497a49b2
> tests: pass only one file at a time to tail(1)
> 
> It looks like the verison on Solaris only tails one file at a time.

Simple solution; I'm sorry it never occurred to me.  Though perhaps "cat"
makes more sense here, since tail actually does grab the whole file?  The
only reason to prefer tail, AFAICT, is for its ability to stick a header
before each file.

Thanks,
Danek

> diff --git a/tests/test-convert-hg-sink.t b/tests/test-convert-hg-sink.t
> --- a/tests/test-convert-hg-sink.t
> +++ b/tests/test-convert-hg-sink.t
> @@ -440,15 +440,12 @@ Two way tests
>    $ echo b > b/f
>    $ hg -R b ci -mb
>  
> -  $ tail */.hg/shamap
> -  ==> 0/.hg/shamap <==
> +  $ tail 0/.hg/shamap
>    86f3f774ffb682bffb5dc3c1d3b3da637cb9a0d6 8a028c7c77f6c7bd6d63bc3f02ca9f779eabf16a
>    dd9f218eb91fb857f2a62fe023e1d64a4e7812fe 8a028c7c77f6c7bd6d63bc3f02ca9f779eabf16a
> -  
> -  ==> a/.hg/shamap <==
> +  $ tail a/.hg/shamap
>    8a028c7c77f6c7bd6d63bc3f02ca9f779eabf16a 86f3f774ffb682bffb5dc3c1d3b3da637cb9a0d6
> -  
> -  ==> b/.hg/shamap <==
> +  $ tail b/.hg/shamap
>    8a028c7c77f6c7bd6d63bc3f02ca9f779eabf16a dd9f218eb91fb857f2a62fe023e1d64a4e7812fe
>  
>    $ hg convert a 0
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Augie Fackler - April 23, 2017, 4:47 p.m.
> On Apr 23, 2017, at 10:53 AM, Danek Duvall <danek.duvall@oracle.com> wrote:
> 
> Augie Fackler wrote:
> 
>> # HG changeset patch
>> # User Augie Fackler <augie@google.com>
>> # Date 1492954690 14400
>> #      Sun Apr 23 09:38:10 2017 -0400
>> # Branch stable
>> # Node ID 6db2667e46e8831772e38639088e39932355336e
>> # Parent  f82cdd5ee57e468c3801cd340691e9b2497a49b2
>> tests: pass only one file at a time to tail(1)
>> 
>> It looks like the verison on Solaris only tails one file at a time.
> 
> Simple solution; I'm sorry it never occurred to me.  Though perhaps "cat"
> makes more sense here, since tail actually does grab the whole file?  The
> only reason to prefer tail, AFAICT, is for its ability to stick a header
> before each file.

Eh, either way. Leaving it as a bunch of tails seems fine too, and prevents enormous spew if the files ever are large for some reason I guess.

> 
> Thanks,
> Danek
> 
>> diff --git a/tests/test-convert-hg-sink.t b/tests/test-convert-hg-sink.t
>> --- a/tests/test-convert-hg-sink.t
>> +++ b/tests/test-convert-hg-sink.t
>> @@ -440,15 +440,12 @@ Two way tests
>>   $ echo b > b/f
>>   $ hg -R b ci -mb
>> 
>> -  $ tail */.hg/shamap
>> -  ==> 0/.hg/shamap <==
>> +  $ tail 0/.hg/shamap
>>   86f3f774ffb682bffb5dc3c1d3b3da637cb9a0d6 8a028c7c77f6c7bd6d63bc3f02ca9f779eabf16a
>>   dd9f218eb91fb857f2a62fe023e1d64a4e7812fe 8a028c7c77f6c7bd6d63bc3f02ca9f779eabf16a
>> -  
>> -  ==> a/.hg/shamap <==
>> +  $ tail a/.hg/shamap
>>   8a028c7c77f6c7bd6d63bc3f02ca9f779eabf16a 86f3f774ffb682bffb5dc3c1d3b3da637cb9a0d6
>> -  
>> -  ==> b/.hg/shamap <==
>> +  $ tail b/.hg/shamap
>>   8a028c7c77f6c7bd6d63bc3f02ca9f779eabf16a dd9f218eb91fb857f2a62fe023e1d64a4e7812fe
>> 
>>   $ hg convert a 0
>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel@mercurial-scm.org
>> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/tests/test-convert-hg-sink.t b/tests/test-convert-hg-sink.t
--- a/tests/test-convert-hg-sink.t
+++ b/tests/test-convert-hg-sink.t
@@ -440,15 +440,12 @@  Two way tests
   $ echo b > b/f
   $ hg -R b ci -mb
 
-  $ tail */.hg/shamap
-  ==> 0/.hg/shamap <==
+  $ tail 0/.hg/shamap
   86f3f774ffb682bffb5dc3c1d3b3da637cb9a0d6 8a028c7c77f6c7bd6d63bc3f02ca9f779eabf16a
   dd9f218eb91fb857f2a62fe023e1d64a4e7812fe 8a028c7c77f6c7bd6d63bc3f02ca9f779eabf16a
-  
-  ==> a/.hg/shamap <==
+  $ tail a/.hg/shamap
   8a028c7c77f6c7bd6d63bc3f02ca9f779eabf16a 86f3f774ffb682bffb5dc3c1d3b3da637cb9a0d6
-  
-  ==> b/.hg/shamap <==
+  $ tail b/.hg/shamap
   8a028c7c77f6c7bd6d63bc3f02ca9f779eabf16a dd9f218eb91fb857f2a62fe023e1d64a4e7812fe
 
   $ hg convert a 0