Patchwork [2,of,2] hghave.py: make matchoutput return what it claims

login
register
mail settings
Submitter timeless@mozdev.org
Date Nov. 24, 2015, 10:33 p.m.
Message ID <38e3dae719431d1b5287.1448404390@waste.org>
Download mbox | patch
Permalink /patch/11619/
State Rejected
Headers show

Comments

timeless@mozdev.org - Nov. 24, 2015, 10:33 p.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1448404316 0
#      Tue Nov 24 22:31:56 2015 +0000
# Node ID 38e3dae719431d1b5287c1e9fd3bf012399a602b
# Parent  f16e3652aabb27c0d8c995cb12773c3b87ff955f
hghave.py: make matchoutput return what it claims
Augie Fackler - Nov. 25, 2015, 12:04 a.m.
On Tue, Nov 24, 2015 at 04:33:10PM -0600, timeless wrote:
> # HG changeset patch
> # User timeless <timeless@mozdev.org>
> # Date 1448404316 0
> #      Tue Nov 24 22:31:56 2015 +0000
> # Node ID 38e3dae719431d1b5287c1e9fd3bf012399a602b
> # Parent  f16e3652aabb27c0d8c995cb12773c3b87ff955f
> hghave.py: make matchoutput return what it claims

This broke some svn hghave business, so I'm dropping it for now.

>
> diff --git a/tests/hghave.py b/tests/hghave.py
> --- a/tests/hghave.py
> +++ b/tests/hghave.py
> @@ -81,7 +81,7 @@
>          ret = -1
>      ret = p.wait()
>      s = p.stdout.read()
> -    return (ignorestatus or not ret) and r.search(s)
> +    return (ignorestatus or not ret) and r.search(s) is not None
>
>  @check("baz", "GNU Arch baz client")
>  def has_baz():
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
timeless - Nov. 25, 2015, 12:35 a.m.
Ok, turns out that the documentation is wrong. I can send a new push
if you like, or you can take the url from irc.

instead of changing the impl to match the comment, the new one changes
the comment to document the impl...

On Tue, Nov 24, 2015 at 7:04 PM, Augie Fackler <raf@durin42.com> wrote:
> On Tue, Nov 24, 2015 at 04:33:10PM -0600, timeless wrote:
>> # HG changeset patch
>> # User timeless <timeless@mozdev.org>
>> # Date 1448404316 0
>> #      Tue Nov 24 22:31:56 2015 +0000
>> # Node ID 38e3dae719431d1b5287c1e9fd3bf012399a602b
>> # Parent  f16e3652aabb27c0d8c995cb12773c3b87ff955f
>> hghave.py: make matchoutput return what it claims
>
> This broke some svn hghave business, so I'm dropping it for now.
>
>>
>> diff --git a/tests/hghave.py b/tests/hghave.py
>> --- a/tests/hghave.py
>> +++ b/tests/hghave.py
>> @@ -81,7 +81,7 @@
>>          ret = -1
>>      ret = p.wait()
>>      s = p.stdout.read()
>> -    return (ignorestatus or not ret) and r.search(s)
>> +    return (ignorestatus or not ret) and r.search(s) is not None
>>
>>  @check("baz", "GNU Arch baz client")
>>  def has_baz():
>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel@selenic.com
>> https://selenic.com/mailman/listinfo/mercurial-devel
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
Augie Fackler - Nov. 25, 2015, 12:36 a.m.
Email new patch please
On Nov 24, 2015 19:35, "timeless" <timeless@gmail.com> wrote:

> Ok, turns out that the documentation is wrong. I can send a new push
> if you like, or you can take the url from irc.
>
> instead of changing the impl to match the comment, the new one changes
> the comment to document the impl...
>
> On Tue, Nov 24, 2015 at 7:04 PM, Augie Fackler <raf@durin42.com> wrote:
> > On Tue, Nov 24, 2015 at 04:33:10PM -0600, timeless wrote:
> >> # HG changeset patch
> >> # User timeless <timeless@mozdev.org>
> >> # Date 1448404316 0
> >> #      Tue Nov 24 22:31:56 2015 +0000
> >> # Node ID 38e3dae719431d1b5287c1e9fd3bf012399a602b
> >> # Parent  f16e3652aabb27c0d8c995cb12773c3b87ff955f
> >> hghave.py: make matchoutput return what it claims
> >
> > This broke some svn hghave business, so I'm dropping it for now.
> >
> >>
> >> diff --git a/tests/hghave.py b/tests/hghave.py
> >> --- a/tests/hghave.py
> >> +++ b/tests/hghave.py
> >> @@ -81,7 +81,7 @@
> >>          ret = -1
> >>      ret = p.wait()
> >>      s = p.stdout.read()
> >> -    return (ignorestatus or not ret) and r.search(s)
> >> +    return (ignorestatus or not ret) and r.search(s) is not None
> >>
> >>  @check("baz", "GNU Arch baz client")
> >>  def has_baz():
> >> _______________________________________________
> >> Mercurial-devel mailing list
> >> Mercurial-devel@selenic.com
> >> https://selenic.com/mailman/listinfo/mercurial-devel
> > _______________________________________________
> > Mercurial-devel mailing list
> > Mercurial-devel@selenic.com
> > https://selenic.com/mailman/listinfo/mercurial-devel
>

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -81,7 +81,7 @@ 
         ret = -1
     ret = p.wait()
     s = p.stdout.read()
-    return (ignorestatus or not ret) and r.search(s)
+    return (ignorestatus or not ret) and r.search(s) is not None
 
 @check("baz", "GNU Arch baz client")
 def has_baz():