[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 5378 - trunk/subversion/tests/clients/cmdline

From: Branko Čibej <brane_at_xbc.nu>
Date: 2003-03-18 23:46:16 CET

Greg Stein wrote:

>>...
>>@@ -89,8 +86,8 @@
>> actual_disk_tree = svntest.tree.build_tree_from_wc(wc_dir, 1)
>>
>> # Compare actual vs. expected disk trees.
>>- return svntest.tree.compare_trees(expected_disk.old_tree(), actual_disk_tree)
>>-
>>+ if svntest.tree.compare_trees(expected_disk.old_tree(), actual_disk_tree):
>>+ raise svntest.Failure
>>
>>
>
>Same here. compare_trees() would just raise the exception.
>
>Note that you would want to create subclasses of svntest.Failure for this
>stuff to raise. For example:
>
> class DifferentTrees(svntest.Failure):
> pass
> ### or maybe some detailed info about how they are different, which
> ### can then be reported as part of the exception handling
>
Or just use SVNTreeUnequal.

>>...
>>@@ -323,17 +321,16 @@
>> mo = re.match(pattern, node.name)
>> if mo:
>> extra_files.pop(extra_files.index(pattern)) # delete pattern from list
>>- return 0
>>+ return
>>
>> print "Found unexpected disk object:", node.name
>>- raise svntest.main.SVNTreeUnequal
>>+ raise svntest.Failure
>>
>>
>
>Woah! Losing information. Create a subclass of svntest.Failure instead. Oh
>hey... lookee there. SVNTreeUnequal *is* a subclass of svntest.Failure :-)
>
Oops, I missed that one...

>>...
>>@@ -741,14 +730,12 @@
>> out, err = svntest.main.run_svn(None, 'propset', '--revprop', '-r', '0',
>> 'cash-sound', 'cha-ching!', sbox.wc_dir)
>> if err:
>>- return 1
>>+ raise svntest.Failure
>>
>>
>
>I think that we want a run_svn() variant that raises exception if anything
>is ever produced on stderr. Maybe run_svn_noerr().
>
>
Yup, I said much the same thing.

-- 
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 Tue Mar 18 23:48:57 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.