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

RE: Copy with externals, then commit fails

From: Ryno Changuion <ryno.changuion_at_za.thalesgroup.com>
Date: Wed, 2 Feb 2011 09:25:03 +0200

>> I tried to create a new branch of a trunk that had some
>> svn:externals definition.
>> In particular, it pointed to a file.
>>
>> I.e.
>> /somewhere/a.txt_at_4 a.txt
>>
>> I used
>> svn copy svn://server/trunk branch
>> And the output from that was the usual stuff including
>> E      a.txt (indicating an externals file).
>>
>> svn stat had the following output:
>>      +X   a.txt
>> Of course, the plus means "with history".
>>
>> After this, I could not do a commit. The commit failed with a
>> message:
>> svn: File not found: revision 4, path '/trunk/a.txt'
>>
>> My suspicion is that due to the fact that the file has history
>> associated
>> with it, the commit tries to commit a file that it shouldn't be
>> committing.
>> Besides, I didn't want to add a.txt to my branch, I still wanted it
>> to come
>> from the original externals definition. Is it a bug that svn copy
>> adds
>> history info to an external file?

>File externals require that the file being pointed to is in the same working copy as the external of it. From the docs:

>"While directory externals can place the external directory at any depth, and any missing intermediate directories will be created, file externals must be placed into a >working copy that is already checked out."

>Bob

Hi Bob
Thanks for the reply.

"file externals must be placed into a working copy that is already checked out".
Agreed. But in my example I was trying to create a branch by using svn copy's
REPOS-URL to WC-PATH option. This meant svn copy created the new working copy and thus
I couldn't start with a "already checked out wc". After this the new branch
(as a wc) couldn't be commited because of the above mentioned history data.

I did find a work-around. I used "svn copy --ignore-externals" when creating the
new branch (as a wc). This meant there was no history info and I could commit.

I am guessing that "svn copy REPOS-URL REPOS-URL" would have worked too.

I found a thread today
(http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=965300)
related to this topic where it was suggested that svn copy REPOS-URL WC should
never fetch externals.

I also found http://subversion.tigris.org/issues/show_bug.cgi?id=3589
I think the issue I was having is a variant of this bug. It is targeted
for a fix in 1.7.0. I found the issue using 1.6.12.

Ryno Changuion
Received on 2011-02-02 08:35:52 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.