You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Ryno Changuion <ry...@za.thalesgroup.com> on 2011/01/26 10:29:55 UTC

Copy with externals, then commit fails

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@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?

 

Anyway, I did manage to work around the problem by using

svn copy --ignore-externals svn://server/trunk branch

 

 

 


Re: Copy with externals, then commit fails

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Bob Archer wrote on Tue, Feb 01, 2011 at 13:32:18 -0500:
> 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."
> 

This quoted part talks about where the pointer will be created, not
about where the pointed-to file should live.  (Currently the only
restriction on that is that it should be in the same repository as the
svn:externals property.)

> BOb
> 

RE: Copy with externals, then commit fails

Posted by Ryno Changuion <ry...@za.thalesgroup.com>.
>> 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@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


RE: Copy with externals, then commit fails

Posted by Bob Archer <Bo...@amsi.com>.
> 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@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