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

[PATCH]#2440 svn rm nonexistent exits with success

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2005-12-09 15:08:12 CET

Hi All,
[[[
returning the error in case file does not exist in the working copy.
]]]

Sorry could not add a test case as the current test suite seems to be
bit difficult for me to add the testcase which can check the exit code
of the actual testcase.
Some observation on my trial to write a testcase for this.
a)Consumers of run_and_verify_svn expect it to return a tuple of size 2,
So change the signature to return the exit code might lead to changes in
600 odd test cases.
b)While trying to get the exit code of popened process using the
following snippet
ps_status=os.wait()
exit_code=os.WEXITSTATUS(ps_status[1]) seem to behave strangely at
times.(1 out of 8 times I get strange exitcode if this code is in
run_command_stdin_*exitcode*, i.e closer to a popen3 call, If I have the
same code inside my testcase hoping os.wait to return the svn process's
exit code, seem to behave unpredictably 1 out of 2 executions.).

With regards
Kamesh Jayachandran

Index: subversion/libsvn_wc/adm_ops.c
===================================================================
--- subversion/libsvn_wc/adm_ops.c (revision 17664)
+++ subversion/libsvn_wc/adm_ops.c (working copy)
@@ -667,7 +667,8 @@
   switch (kind)
     {
     case svn_node_none:
- /* Nothing to do. */
+ return svn_error_createf (SVN_ERR_WC_NOT_FILE, NULL,
+ _("'%s' not existing in the working copy and repository"), path);
       break;
 
     default:

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Dec 9 15:18:57 2005

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.