[PATCH 2 of 3] extensions: register functions always at loading extension (issue5601)

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Mon Jun 26 04:21:35 EDT 2017


At Sun, 25 Jun 2017 20:24:47 -0400,
Matt Harbison wrote:
> 
> On Fri, 23 Jun 2017 13:48:56 -0400, FUJIWARA Katsunori  
> <foozy at lares.dti.ne.jp> wrote:
> 
> > # HG changeset patch
> > # User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
> > # Date 1498239560 -32400
> > #      Sat Jun 24 02:39:20 2017 +0900
> > # Node ID bd02107d5a20adff17f744a422b2530284215a7a
> > # Parent  5808466886a165460b52de226ab5d3c4c1379692
> > extensions: register functions always at loading extension (issue5601)
> 
> ...
> 
> > @@ -118,6 +129,14 @@ Check hgweb's load order:
> >    4) foo reposetup
> >    4) bar reposetup
> > +(check that revset predicate foo() and bar() are available)
> > +
> > +  $ REQUEST_METHOD='GET' PATH_INFO='/shortlog' SCRIPT_NAME='' \
> > +  >     QUERY_STRING='rev=foo() and bar()' \
> > +  >     SERVER_PORT='80' SERVER_NAME='localhost' python hgweb.cgi \
> > +  >     | grep '<a href="/rev/[0-9a-z]*">'
> > +     <a href="/rev/c24b9ac61126">add file</a>
> > +
> 
> This grep is failing on Windows, because a 400 page is being generated.   
> The content is:
> 
>    Status: 400 no such method: C:\r
> 
> So it's almost certainly more MSYS path mangling, and not serious.  I  
> can't figure out why the very similar looking query above it works, and  
> you're probably more familiar than I am with this, so can you take a look  
> when you get a chance?  Thanks.

Ah, thanks for good catching!

I overlooked that other wsgicgi/CGI tests are guarded like as below:

  - omit testing by "#if no-msys"/"#require no-msys"

    - test-clone-cgi.t
    - test-hgweb-commands.t
    - test-newcgi.t
    - test-newercgi.t
    - test-oldcgi.t
    - test-push-cgi.t

  - branch at PATH_INFO setup by "#if msys/#else/#endif"

    - test-mq.t

  - MSYS seems to omit translation for PATH_INFO='/'

    - test-largefiles.t
    - (previous) test-extension.t

I'll post followup patch.

> >    $ echo 'foo = !' >> $HGRCPATH
> >    $ echo 'bar = !' >> $HGRCPATH
> > _______________________________________________
> > Mercurial-devel mailing list
> > Mercurial-devel at mercurial-scm.org
> > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
> 

-- 
----------------------------------------------------------------------
[FUJIWARA Katsunori]                             foozy at lares.dti.ne.jp


More information about the Mercurial-devel mailing list