[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Fix wrapping of 'svn help' output at 80 chars

From: Nathan Hartman <hartman.nathan_at_gmail.com>
Date: Wed, 4 Dec 2019 16:05:13 -0500

On Wed, Dec 4, 2019 at 3:51 AM Daniel Shahaf <d.s_at_daniel.shahaf.name> wrote:
> Nathan Hartman wrote on Wed, 04 Dec 2019 05:43 +00:00:
> > I haven't confirmed this yet but I think that fixes it because at some
> > point between initialization and this test running, sys.argv[0] is
> > being modified.
>
> Confirmed.

Thanks. More below...

> > I found two instances of sys.argv[0] being assigned in
> > subversion/tests/cmdline/svntest/main.py -- see _internal_run_tests()
> > and execute_tests(). Not sure if that's where it's happening.
>
> Sounds plausible. The comments next to those assignments support
> this theory.
>
> > I'm running the full test suite now...
> >
> > If all goes well then I think it should be committed.
>
> We can certainly commit it if your test run passes.

I can confirm that with the patch applied, getopt_tests.py runs and
all its tests pass when invoked in all three of the following ways:
* 'make check'
* 'make check TESTS=subversion/tests/cmdline/getopt_tests.py'
* 'cd subversion/tests/cmdline' and './getopt_tests.py'

I'll go ahead and commit it... We'll see how the buildbots feel about it. :-)

More below...

> I think it will be even better for *_tests.py to use __file__ rather
> than rely on sys.argv[0] to be correct, especially if the sys.argv[0]
> fixup happens only after getopt_tests.py's top-level code is run. (We
> can commit the patch I posted first and make a change along these lines
> afterwards.)

That is a bigger change, so I think I'll commit the patch as-is and
then go from there...

Cheers,
Nathan
Received on 2019-12-04 22:05:33 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.