You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@lyra.org> on 2003/03/18 22:44:30 UTC
Re: svn commit: rev 5379 - trunk/subversion/tests/clients/cmdline
Oh, crap crap crap.
Bad design is propagating before a design review was performed. Not good...
On Tue, Mar 18, 2003 at 03:50:05PM -0600, kraai@tigris.org wrote:
>...
> @@ -79,15 +76,13 @@
> None, None,
> None, None,
> wc_dir):
> - return 1
> + raise svntest.Failure
run_and_verify_commit() should have raised the error. NOT the test function.
Again, the idea was to simplify the test functions. This just changes the
nature of the work they still have to perform.
> # Youngest revision should now be 2. Let's verify that.
> output, errput = svntest.main.run_svnlook("youngest", repo_dir)
>
> if output[0] != "2\n":
> - return 1
> -
> - return 0 # success
> + raise svntest.Failure
This is still fine, but it should raise a Failure subclass instead.
>...
> @@ -103,10 +98,10 @@
> E_path = os.path.join(wc_dir, 'A', 'B', 'E')
> E2_path = os.path.join(wc_dir, 'A', 'B', 'E2')
> output, errput = svntest.main.run_svn(None, 'mv', E_path, E2_path)
> - if errput: return 1
> + if errput: raise svntest.Failure
> alpha_path = os.path.join(E2_path, 'alpha')
> output, errput = svntest.main.run_svn(None, 'rm', alpha_path)
> - if errput: return 1
> + if errput: raise svntest.Failure
See previous comment about a run_svn() variant that raises an error if
anything is produced on stderr.
>...
> output, errput = svntest.main.run_svnlook("dirs-changed", repo_dir)
> if errput:
> - return 1
> + raise svntest.Failure
And a variant for run_svnlook(), too. Maybe run_svnlook_noerr().
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org