You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Michael Schierl <sc...@gmx.de> on 2011/04/07 20:26:18 UTC

Renaming and replacing files referenced by svn:externals (in the same repository) breaks all working copies :(

[ Please CC: me since I am not subscribed to the list. Thank you. ]

Hi,

I'd like to report what I think is a bug in SVN 1.6.16.

I attached two minimal repository dumps to reproduce the problem. The
first repository dump contains a file original/COPYING which is linked
(via svn:externals) to linked/COPYING. (The "real" repository contained
a lot of files below "original" and "linked" which are omitted here for
brevity).

In the second repository dump, the file COPYING has been renamed to
COPYING.gpl and a new file COPYING has been added that refers to the
COPYING.gpl file in its text. The svn:externals of linked directory has
been updated to include both COPYING and COPYING.gpl.

When a working copy is at revision 1 (which has been updated to the
latest revision when revision 1 was the latest revision; it does not
work if they are updated to revision 1 when revision 2 already exists,
as in this case the externals will pull revision 2), and you try to
update it to revision 2, the following error is shown:

$ svn up
D    linked/COPYING
A    linked/COPYING
 U   linked
D    original/COPYING
A    original/COPYING
A    original/COPYING.gpl

Fetching external item into 'linked/COPYING'
svn: warning: The file external from 'file:///tmp/repo/original/COPYING'
cannot overwrite the existing versioned item at 'linked/COPYING'


Fetching external item into 'linked/COPYING.gpl'
E    linked/COPYING.gpl
Updated external to revision 2.

Updated to revision 2.

$

Retrying the update does not help either:

$ svn up

Fetching external item into 'linked/COPYING'
svn: warning: The file external from 'file:///tmp/repo/original/COPYING'
cannot overwrite the existing versioned item at 'linked/COPYING'


Fetching external item into 'linked/COPYING.gpl'
External at revision 2.

At revision 2.

$

The only way I found to repair the working copy was to remove the whole
linked directory and updating the parent directory again (which is a
nuisance since there are lots of files in there which might have local
modifications).


Regards,


Michael

Re: Renaming and replacing files referenced by svn:externals (in the same repository) breaks all working copies :(

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Michael Schierl wrote on Thu, Apr 07, 2011 at 20:26:18 +0200:
> [ Please CC: me since I am not subscribed to the list. Thank you. ]
> 
> Hi,
> 
> I'd like to report what I think is a bug in SVN 1.6.16.
> 

Thanks for the detailed bug report.  I haven't looked at all the details
in your post yet, but one thing stood out:

> svn: warning: The file external from 'file:///tmp/repo/original/COPYING'
> cannot overwrite the existing versioned item at 'linked/COPYING'

I routinely get the same warning in my working copy of the ASF
Infrastructure repository, where the problem is a file external that
points at a mirror URL of the repository which is different to the
mirror URL I am using.  (I use svn.eu.apache.org and the external points
to svn-master.apache.org.)

It causes 'svn up' to always have a non-zero exit code, but the update
otherwise finishes successfully.