On Friday 22 April 2005 00:50, Alexander Thomas wrote:
> [[[
> Version 2:, Patch to fix issue 2224 - "svn copy mydir mydir" in a wc
> recurses
> infinitely
> * subversion/libsvn_subr/io.c
> (svn_io_copy_dir_recursively): limits recursion to one level for
> wc_path copy to itself
>
> * subversion/tests/clients/cmdline/copy_tests.py
> (wc_copy_dir_to_same_dir): Added function to verify failure when
> copying a wc path to itself
> (test_list): Added wc_copy_dir_to_same_dir
This entry doesn't match the patch.
> ]]]
[snip]
> + if (strcmp (this_entry.name, dst_basename)==0)
> + continue;
I added a comment to this line and adjusted the white space to match the
rest of the file.
> + # try to copy dir to itself
> + ## TODO need to kill the process after a couple of seconds
> + ## to prevent infinite wait
No need to worry about it being an infinite wait. The OS will eventually
fail you because you've reached a path length limitation. An exception
will be raised accordingly in Python.
> + output, err = svntest.main.run_svn(1, 'copy', dir_path, dir_path)
> + error_msg = "svn: Cannot copy path '" + dir_path + "' into itself"
> + for line in err:
> + if line.find(error_msg) != -1:
> + break
> + else:
> + print "Failed to find '", error_msg, "' in: ", err
> + raise svntest.Failure
svntest.actions.run_and_verify_svn() is the preferred method for testing
stdout and stderr. Also, this test appears to be looking for a failure
in the command when it should be looking for a successful return from it.
I made the appropriate changes and committed it to trunk/ in r14401.
Thanks for going back and changing the patch.
-John
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Apr 22 12:40:57 2005