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

Re: [PATCH] commit_tests

From: Stefan Sperling <stsp_at_elego.de>
Date: Fri, 12 Jun 2009 11:20:15 +0100

On Fri, Jun 12, 2009 at 09:47:40AM +0800, HuiHuang wrote:
> Hey Stefan,
>
> Yes, I agree with you. Actually the test is passed in current state.

Wait, there is something wrong in what we are doing!
It looks like I didn't give you good advice :(

After looking at commit_tests.py more closely, I realised that there
already is a test that does what we need!
It is the "commit_multiple_wc" test below which you put your test.

So instead of adding a new test, we can change the commit_multiple_wc
test to expect the commit to succeed instead of fail, and mark the
test XFail. Can you make a patch for that?

The test you wrote is still useful, however.
Your test tries to test the case where the two working copies do
not come from the same repository. That is OK, we will need this
test, too. You could add this test in another patch.

Note that when you wrote your test, you made both working copies
come from the same repository!

+ # Checkout two working copies
+ wc1_dir = os.path.join(wc_dir, 'wc1')
+ wc2_dir = os.path.join(wc_dir, 'wc2')
+ url = sbox.repo_url

Here, you define one repository URL.

+ svntest.actions.run_and_verify_svn("Output on stderr where none
expected",
+ svntest.verify.AnyOutput, [],
+ 'checkout',
+ url, wc1_dir)

Here you use the URL to checkout WC1.

+ svntest.actions.run_and_verify_svn("Output on stderr where none
expected",
+ svntest.verify.AnyOutput, [],
+ 'checkout',
+ url, wc2_dir)

And here use the same URL again to checkout WC2.
That doesn't look right to me.
Instead, we need two different repositories, with two different URLs,
and checkout each WC from a different URL.

I suggest you take the commit_multiple_wc test as it is now
(it expects failure), copy it to a new test called commit_multiple_wc2
or commit_multiple_wc_multiple_repos or something like that,
and change to use a separate repository for each working copy.
That is probably easier than writing the test from scratch.

There might be other tests using more than one repository,
I don't know. You could try to find examples for how to do this.
Or maybe if you read carefully through the code in
subversion/tests/cmdline/svntest/sandbox.py
you might be able to find out how this can be done.

Stefan
Received on 2009-06-12 12:21:31 CEST

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.