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

Re: [PATCH] issue #2224- copy wc path to itself recurses infinitely

From: John Szakmeister <john_at_szakmeister.net>
Date: 2005-04-14 10:29:38 CEST

On Thursday 14 April 2005 04:06, Alexander wrote:
> Sorry, re-sending due to missing log message and issues with the test
> case.
> There are a couple of issues. One is about the test case - how to kill
> a long-running process from Python in both *nix and Windows? The second
> is the error code - SVN_ERR_UNSUPPORTED_FEATURE is not as good as
> SVN_ERR_INVALID_ARGUMENTS, but that does not exist.
> The issue is here:
> http://subversion.tigris.org/issues/show_bug.cgi?id=2224

Thanks for taking a stab at this, but I think you've missed the spirit of
the problem (actually there's two of them involving the same code, only
one of them is in the issue report though). It's not an error for
someone to want to copy a directory into itself.

The only case that fails to Do the Right Thing involving copying
directories is 'svn cp wc-path wc-path', where wc-path contains the same
name (and actually represents the same path... ie., it's copy itself into
itself). Part problem actually lies copy_dir_administratively() (located
in subversion/libsvn_wc/copy.c). It's making a call to
svn_io_copy_dir_recursively(), which leads to 2 problems:
 * svn_io_copy_dir_recursively() fails to watch for and skip recursing
into dst_basename while looping through the directory contents, at least
at the top level (it's actually dst_path + dst_basename that you need to
filter). :-)
 * Since copy_dir_administratively() is using
svn_io_copy_dir_administratively(), it's copying both versioned and
unversioned files. I believe that is also an error, but isn't
necessarily related to this issue.

Do you mind taking a stab at this again? At the very least,
svn_io_copy_dir_administratively() should be made to work correctly.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Apr 14 12:16:48 2005

This is an archived mail posted to the Subversion Dev mailing list.