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

Re: svn commit: rev 5488 - trunk/subversion/tests/clients/cmdline

From: Branko Čibej <brane_at_xbc.nu>
Date: 2003-03-29 02:58:05 CET

philip@tigris.org wrote:

>Author: philip
>Date: Fri Mar 28 12:00:02 2003
>New Revision: 5488
>
>Modified:
> trunk/subversion/tests/clients/cmdline/update_tests.py
>Log:
>While 'svn mkdir URL' can't create a versioned directory called .svn,
>there are more devious ways to do it.
>
>* subversion/tests/clients/cmdline/update_tests.py
> (update_receive_illegal_name): Don't skip. Use mkdir then mv to
> create a versioned .svn directory.
>
>
>Modified: trunk/subversion/tests/clients/cmdline/update_tests.py
>==============================================================================
>--- trunk/subversion/tests/clients/cmdline/update_tests.py (original)
>+++ trunk/subversion/tests/clients/cmdline/update_tests.py Fri Mar 28 12:00:02 2003
>@@ -1002,16 +1002,21 @@
>
> # This tests the revision 4334 fix for issue #1068.
> wc_dir = sbox.wc_dir
>+ legal_url = svntest.main.current_repo_url + '/A/D/G/svn'
> illegal_url = svntest.main.current_repo_url + '/A/D/G/.svn'
>- outlines, errlines = svntest.main.run_svn(None, 'mkdir', '-m', 'log msg',
>- illegal_url)
>+ # Ha! The client doesn't allow us to mkdir a '.svn' but it does
>+ # allow us to copy to a '.svn' so ...
>
So, this'll work until we teach "svn mv" to not allow that. Oh, well...

>+ svntest.actions.run_and_verify_svn(None, None, [],
>+ 'mkdir', '-m', 'log msg',
>+ legal_url)
>+ svntest.actions.run_and_verify_svn(None, None, [],
>+ 'mv', '-m', 'log msg',
>+ legal_url, illegal_url)
> out, err = svntest.main.run_svn(1, 'up', wc_dir)
>-
>- if err:
>- return 0
>- else:
>- return 1
>-
>+ for line in err:
>+ if re.search("Obstructed update", line):
>+ return 0
>+ raise svntest.Failure
>
Master Ling, he say: "You no return zero from tests! Return ugly. Now I
teach Python-Fu!"

for line in err:
  if re.search("Obstructed update", line):
    break
else:
  raise svntest.Failure

In the words of Swami Krishnamurthi, "Pay attention to indentation.
Wrong indentation will destroy your harmony and add another 1000
rebirths on your path to Nirvana."

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Mar 29 02:58:49 2003

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.