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

Bug in 'svn copy --parents url url'?

From: Alexander Sinyushkin <Alexander.Sinyushkin_at_svnkit.com>
Date: Wed, 25 Jun 2008 00:08:55 +0700


If I try to copy an existing directory to nonexistent one with
--parents, like this:

svn copy --parents svn://localhost/repo/x svn://localhost/repo/y

where x exists and y does not, an editor for commit message is launched
twice (if no -m or -F is provided). Commit succeeds, i.e. afterwards I
see /y/x in my repo but isn't it a bug that the editor is launched twice?

Debugging this command I see that first call to setup_copy() fails with
the following error:

"File already exists: filesystem '/home/alex/workspace/tmp/repo/db',
transaction '9-f', path '/y'"

The problem here is in that commit paths array (which is passed to
svn_delta_path_driver()) contain two identical strings "y" what causes
the aforementioned error.

But then the second call to setup_copy() is made in the following if
clause and commit ends well.

   if (copy_as_child && err && (sources->nelts == 1)
         && (err->apr_err == SVN_ERR_ENTRY_EXISTS
             || err->apr_err == SVN_ERR_FS_ALREADY_EXISTS))

Anyway, I'm reporting this because you may decide that this behavior
should be changed. Thank you.

Alexander Sinyushkin,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-06-24 19:09:40 CEST

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.