[MERGE REVIEW] Remove ConfigObj validation
aaron.bentley at utoronto.ca
Sun Jun 11 04:36:21 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Martin Pool wrote:
> +1 to having something like this added back in; it is useful in rare
> cases. Perhaps 'run_bzr_subprocess' would be better? I do think it
> should have a docstring:
> Run bzr in a subprocess for testing.
> This starts a new Python interpreter and runs bzr in there.
> This should only be used for tests that have a justifiable need for
> this isolation: e.g. they are testing startup time, or signal
> handling, or early startup code, etc. Subprocess code can't be
> profiled or debugged so easily.
> Robert (iirc) expressed the other day a dislike of run_bzr things that
> split up strings; they're prone to split the wrong way. (Though using
> shlex might help.) Also we have a general principle against magic-dwim
> on arguments. Since this should be called rarely I would rather just
> delete the splitting of args and make the caller be explicit.
Shlex helps a lot. You won't get splitting in inappropriate places.
For shell-like commands, I think it's only natural to use shell-like
syntax. It's easier to read and easier to write. Robert may not like
it, but he doesn't have to use it-- multiple argument support is also
provided. And this is not intended to be a generalized call-- where we
use it, we'll use it directly, in the test suite.
> It may be better to run sys.executable, which will get the same Python
> interpreter and might help on Windows.
Yes, we can do that.
> Since retcode is the only kwarg why not just take it explicitly?
Slavish imitation of the other run_bzr commands, I guess.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v220.127.116.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the bazaar