[PATCH 2 of 4] test-help: fix grep pattern for Windows

Matt Harbison mharbison72 at gmail.com
Sun Dec 13 22:25:40 CST 2015


On Sun, 13 Dec 2015 23:04:00 -0500, timeless <timeless at gmail.com> wrote:

> before some of my changes (e.g. stable),

But if my patch goes on default, we don't care about the differences on  
stable right?  (I think I might be missing something obvious here.)

> [timeless at gcc2-power8 crew]$ hg help -k clone|grep debug
>  debugapplystreamclonebundle  apply a stream clone bundle file
>  debugcreatestreamclonebundle create a stream clone bundle file
>
> but, basically, "debug" shouldn't appear unless you use --debug (in
> which case, it should be listed) or are searching for "debug".
>
> although, it looks like the test is checking the wrong flag, `-c`
> (oops) -- i.e. it should test at least `-k`.

Let's drop this one then, and you can fix up that part.  I'll resubmit  
after your fix lands.

BTW, I did a `hg help -k` on stable and got a crash that isn't present on  
default.  Maybe one of those fixes should be on stable?  (Although it is  
such a minor case, maybe it isn't worth it.)

> On Sun, Dec 13, 2015 at 10:42 PM, Matt Harbison <mharbison72 at gmail.com>  
> wrote:
>> On Sun, 13 Dec 2015 22:33:24 -0500, timeless <timeless at gmail.com> wrote:
>>
>>> It's also looking for "debug" items, which shouldn't be present. So,
>>> the |debug should be retained.
>>
>>
>> I wondered about that, but I didn't see anything output with debug in  
>> it.
>> In what case(s) does "debug" print out?
>>
>>
>>> On Sun, Dec 13, 2015 at 9:56 PM, Matt Harbison <mharbison72 at gmail.com>
>>> wrote:
>>>>
>>>> # HG changeset patch
>>>> # User Matt Harbison <matt_harbison at yahoo.com>
>>>> # Date 1450039304 18000
>>>> #      Sun Dec 13 15:41:44 2015 -0500
>>>> # Node ID 685b106ac877d0c28b0e4c2d9eed1b0498304401
>>>> # Parent  fd7dae9c8cff40fb46f7ba3acb10879956f4c759
>>>> test-help: fix grep pattern for Windows
>>>>
>>>> I'm not sure what's going on with my copy of egrep, but it doesn't  
>>>> seem
>>>> to
>>>> recognize the '\S' class:
>>>>
>>>>   $ egrep --version
>>>>   GNU grep 2.5.4
>>>>   $ echo "foo" | egrep '\S'
>>>>   $
>>>>
>>>> The spirit of the test seems to be to print only the headers, which  
>>>> start
>>>> capitalized in the first column, so check that.
>>>>
>>>> diff --git a/tests/test-help.t b/tests/test-help.t
>>>> --- a/tests/test-help.t
>>>> +++ b/tests/test-help.t
>>>> @@ -1053,11 +1053,11 @@
>>>>
>>>>  Test -e / -c / -k combinations
>>>>
>>>> -  $ hg help -c|egrep '^\S|debug'
>>>> +  $ hg help -c|egrep '^[A-Z]'
>>>>    Commands:
>>>> -  $ hg help -e|egrep '^\S'
>>>> +  $ hg help -e|egrep '^[A-Z]'
>>>>    Extensions:
>>>> -  $ hg help -k|egrep '^\S'
>>>> +  $ hg help -k|egrep '^[A-Z]'
>>>>    Topics:
>>>>    Commands:
>>>>    Extensions:
>>>> _______________________________________________
>>>> Mercurial-devel mailing list
>>>> Mercurial-devel at selenic.com
>>>> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list