[PATCH 3 of 3] check-code: enforce (glob) on output lines containing 127.0.0.1
Jun Wu
quark at fb.com
Mon Jul 11 15:09:44 EDT 2016
The "recomment" filter
testfilters = [
(r"( *)(#([^\n]*\S)?)", repcomment),
(r"<<(\S+)((.|\n)*?\n\1)", rephere),
]
changes
<id>http://127.0.0.1:$HGPORT/#changeset-61c9426e69fef294feed5e2bbfc97d39944a5b1c</id> (glob)
to:
<id>http://127.0.0.1:$HGPORT/###############################################################
Excerpts from Augie Fackler's message of 2016-07-09 23:23:25 -0400:
>
> > On Jul 9, 2016, at 11:20 PM, Augie Fackler <raf at durin42.com> wrote:
> >
> > # HG changeset patch
> > # User Augie Fackler <raf at durin42.com>
> > # Date 1468119843 14400
> > # Sat Jul 09 23:04:03 2016 -0400
> > # Node ID 58da5c3d2b928773dd896700822a98e003686727
> > # Parent c6794e62d4954d6659b7e3e23e8f81554a073584
> > check-code: enforce (glob) on output lines containing 127.0.0.1
>
> I’ve delved about as deep as I can stand right now on the test failure mentioned in the commit message. Anyone out there got an idea what I’m doing wrong?
>
> Thanks!
> Augie
>
> >
> > Bafflingly, this fails thus:
> >
> > --- /Users/augie/Programming/hg/crew/tests/test-check-code.t
> > +++ /Users/augie/Programming/hg/crew/tests/test-check-code.t.err
> > @@ -17,3 +17,10 @@
> > Skipping i18n/polib.py it has no-che?k-code (glob)
> > Skipping mercurial/httpclient/__init__.py it has no-che?k-code (glob)
> > Skipping mercurial/httpclient/_readers.py it has no-che?k-code (glob)
> > + tests/test-hgweb-no-path-info.t:90:
> > + > <id>http://127.0.0.1:$HGPORT/#changeset-61c9426e69fef294feed5e2bbfc97d39944a5b1c</id> (glob)
> > + use (glob) to match localhost IP on hosts without 127.0.0.1 too
> > + tests/test-hgweb-no-request-uri.t:101:
> > + > <id>http://127.0.0.1:$HGPORT/#changeset-61c9426e69fef294feed5e2bbfc97d39944a5b1c</id> (glob)
> > + use (glob) to match localhost IP on hosts without 127.0.0.1 too
> > + [1]
> >
> > ERROR: test-check-code.t output changed
> >
> > Those lines shouldn't match the error re in question, so I'm not sure
> > why this is happening.
> >
> > diff --git a/contrib/check-code.py b/contrib/check-code.py
> > --- a/contrib/check-code.py
> > +++ b/contrib/check-code.py
> > @@ -189,6 +189,8 @@ utestpats = [
> > (r'^ .*: largefile \S+ not available from file:.*/.*[^)]$', winglobmsg),
> > (r'^ .*file://\$TESTTMP',
> > 'write "file:/*/$TESTTMP" + (glob) to match on windows too'),
> > + (r'^ [^$>].*27\.0\.0\.1.*[^)]$',
> > + 'use (glob) to match localhost IP on hosts without 127.0.0.1 too'),
> > (r'^ (cat|find): .*: No such file or directory',
> > 'use test -f to test for file existence'),
> > (r'^ diff -[^ -]*p',
> > @@ -207,8 +209,8 @@ utestpats = [
> > ],
> > # warnings
> > [
> > - (r'^ [^*?/\n]* \(glob\)$',
> > - "glob match with no glob character (?*/)"),
> > + (r'^ (?!.*127\.0\.0\.1)[^*?/\n]* \(glob\)$',
> > + "glob match with no glob string (?, *, /, and 127.0.0.1)"),
> > ]
> > ]
> >
More information about the Mercurial-devel
mailing list