[PATCH STABLE v2] hghave: don't claim we have `tic` if it's NetBSD's binary (issue5698)
Augie Fackler
raf at durin42.com
Thu Jun 28 07:02:13 EDT 2018
On Thu, Jun 28, 2018, 06:30 Thomas Klausner <tk at giga.or.at> wrote:
> On Wed, Jun 27, 2018 at 11:50:18AM -0400, Augie Fackler wrote:
> > # HG changeset patch
> > # User Augie Fackler <augie at google.com>
> > # Date 1529932907 14400
> > # Mon Jun 25 09:21:47 2018 -0400
> > # Branch stable
> > # Node ID af7d21e1e44c1bb756af28b5978d3f7ee7d50eda
> > # Parent 0b63a6743010dfdbf8a8154186e119949bdaa1cc
> > hghave: don't claim we have `tic` if it's NetBSD's binary (issue5698)
> >
> > test-status-color.t fails with different output because of mismatches
> > between how `tic` behaves from NetBSD's base system and ncurses'
> > verison (if I understand the bug right). The bug suggested using -V to
> > avoid the issue, so we'll do that.
>
> This looks like it should work, but it doesn't.
>
Nuts.
>
> ---
> /scratch/devel/py-mercurial/work/mercurial-4.6.1/tests/test-status-color.t
> +++
> /scratch/devel/py-mercurial/work/mercurial-4.6.1/tests/test-status-color.t.err
> @@ -243,15 +243,18 @@
> $ mkdir "$TESTTMP/terminfo"
> $ TERMINFO="$TESTTMP/terminfo" tic "$TESTDIR/hgterm.ti"
> $ TERM=hgterm TERMINFO="$TESTTMP/terminfo" hg status --config
> color.mode=terminfo -A
> - \x1b[30m\x1b[32m\x1b[1mA \x1b[30m\x1b[30m\x1b[32m\x1b[1madded\x1b[30m
> (esc)
> - \x1b[30m\x1b[32m\x1b[1mA \x1b[30m\x1b[30m\x1b[32m\x1b[1mcopied\x1b[30m
> (esc)
> - \x1b[30m\x1b[30m modified\x1b[30m (esc)
> - \x1b[30m\x1b[31m\x1b[1mR \x1b[30m\x1b[30m\x1b[31m\x1b[1mremoved\x1b[30m
> (esc)
> - \x1b[30m\x1b[36m\x1b[1m\x1b[4m!
> \x1b[30m\x1b[30m\x1b[36m\x1b[1m\x1b[4mdeleted\x1b[30m (esc)
> - \x1b[30m\x1b[35m\x1b[1m\x1b[4m?
> \x1b[30m\x1b[30m\x1b[35m\x1b[1m\x1b[4munknown\x1b[30m (esc)
> - \x1b[30m\x1b[30m\x1b[1mI \x1b[30m\x1b[30m\x1b[30m\x1b[1mignored\x1b[30m
> (esc)
> - \x1b[30m\x1b[30mC \x1b[30m\x1b[30m\x1b[30m.hgignore\x1b[30m (esc)
> - \x1b[30m\x1b[30mC \x1b[30m\x1b[30m\x1b[30mmodified\x1b[30m (esc)
> + warning: failed to set color mode to terminfo
> + warning: failed to set color mode to terminfo
> + warning: failed to set color mode to terminfo
> + \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc)
> + \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mcopied\x1b[0m (esc)
> + \x1b[0;0m modified\x1b[0m (esc)
> + \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc)
> + \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc)
> + \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc)
> + \x1b[0;30;1mI \x1b[0m\x1b[0;30;1mignored\x1b[0m (esc)
> + \x1b[0;0mC \x1b[0m\x1b[0;0m.hgignore\x1b[0m (esc)
> + \x1b[0;0mC \x1b[0m\x1b[0;0mmodified\x1b[0m (esc)
>
> The user can define effects with raw terminfo codes:
>
> @@ -262,15 +265,18 @@
> > terminfo.bold = \E[2m
> > EOF
> $ TERM=hgterm TERMINFO="$TESTTMP/terminfo" hg status --config
> color.mode=terminfo --config color.status.clean=dim -A
> - \x1b[30m\x1b[32m\x1b[2mA \x1b[30m\x1b[30m\x1b[32m\x1b[2madded\x1b[30m
> (esc)
> - \x1b[30m\x1b[32m\x1b[2mA \x1b[30m\x1b[30m\x1b[32m\x1b[2mcopied\x1b[30m
> (esc)
> - \x1b[30m\x1b[30m modified\x1b[30m (esc)
> - \x1b[30m\x1b[31m\x1b[2mR \x1b[30m\x1b[30m\x1b[31m\x1b[2mremoved\x1b[30m
> (esc)
> - \x1b[30m\x1b[36m\x1b[2m\x1b[4m!
> \x1b[30m\x1b[30m\x1b[36m\x1b[2m\x1b[4mdeleted\x1b[30m (esc)
> - \x1b[30m\x1b[35m\x1b[2m\x1b[4m?
> \x1b[30m\x1b[30m\x1b[35m\x1b[2m\x1b[4munknown\x1b[30m (esc)
> - \x1b[30m\x1b[30m\x1b[2mI \x1b[30m\x1b[30m\x1b[30m\x1b[2mignored\x1b[30m
> (esc)
> - \x1b[30m\x1b[88mC \x1b[30m\x1b[30m\x1b[88m.hgignore\x1b[30m (esc)
> - \x1b[30m\x1b[88mC \x1b[30m\x1b[30m\x1b[88mmodified\x1b[30m (esc)
> + warning: failed to set color mode to terminfo
> + warning: failed to set color mode to terminfo
> + warning: failed to set color mode to terminfo
> + \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc)
> + \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mcopied\x1b[0m (esc)
> + \x1b[0;0m modified\x1b[0m (esc)
> + \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc)
> + \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc)
> + \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc)
> + \x1b[0;30;1mI \x1b[0m\x1b[0;30;1mignored\x1b[0m (esc)
> + \x1b[0;2mC \x1b[0m\x1b[0;2m.hgignore\x1b[0m (esc)
> + \x1b[0;2mC \x1b[0m\x1b[0;2mmodified\x1b[0m (esc)
>
> #endif
>
>
> ERROR: test-status-color.t output changed
>
>
> How do I run the single test with the same settings as when it's run
> in the context of the full test suite?
>
`make local` (just once, will speed up the process if you need multiple
runs)
`(cd tests && python run-tests.py --local test-status-color.t)`
Thomas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20180628/a0526062/attachment.html>
More information about the Mercurial-devel
mailing list