[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 12:53:08 CEST

On Thursday 14 April 2005 06:31, Alexander Thomas wrote:
> On Thu, 2005-04-14 at 13:59, John Szakmeister wrote:
> > It's not an error for someone to want to copy a directory into
> > itself.
> what I suggest is to follow unix style.

Hmm... I've never really tried that before with cp, but it does indeed

> > * 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). :-)
> >
> > Do you mind taking a stab at this again? At the very least,
> > svn_io_copy_dir_administratively() should be made to work correctly.
> I will send some time on this, but my strong feeling is to keep it
> simple and solve this before it reaches copy_dir_administratively, like
> my patch do (i guess so..). 'svn_io_copy_dir_recursively' recurse
> infinitely only if 'svn cp' tries to copy wc_path to itself and in
> other cases, I hope it's perfect.

If we're following the same logic, then svn_io_copy_dir_recursively()
should probably be made to error out when the src == dst_path.

I think there are probably a couple of other minor nits with your patch.
I'll give it further review tonight, if someone else doesn't pick it up


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

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