I'm trying to add an image as svn:externals
but TortoiseSVN refuses it somehow.
Currently I have two repositories on my local drive named repoA
and repoB
. Also there are two checkouts of working directories named workA
and workB
. workA
is a checkout of repoA
and workB
is a checkout of repoB
.
The structure is like this:
Z:\repos\repoA
Z:\repos\repoB
Z:\Projects\workA
Z:\Projects\workB
What I did:
Z:\Projects\workB
-> TortoiseSVN -> Properties
New -> Externals
pressed New
, typed trunk/screenshot.jpg
for Local Path and file:///Z:/repos/repoA/trunk/screenshot.jpg
for URL.
pressed OK
to close all setting windows.
Z:\Projects\workB
-> SVN Commit..
Z:\Projects\workB
-> SVN Update..
And I get this error:
Z:\Projects\workB\trunk\screenshot.jpg
Unsupported external: url of file external
'file:///Z:/repos/repoA/trunk/screenshot.jpg' is not in repository
'file:///Z:/repos/repoB'
When I commit a new change on workB/trunk
, it won't update the image. So performing SVN Update
on workB/trunk
does not import the image from repoA. I also have a folder imported as svn:externals
and the files under it are imported properly. So I suspect a single file cannot be specified. I don't know.
In the repo-browser, the real file is not present there is only the link file.
In repoA
there is the real image file although the error says there isn't.
So is it possible to do? Or am I doing it in the wrong way?
Update
According to this article,
Subversion 1.6 also introduced support for external definitions for files. File externals are configured just like externals for directories and appear as a versioned file in the working copy.
For example, let's say you had the file /trunk/bikeshed/blue.html in your repository, and you wanted this file, as it appeared in revision 40, to appear in your working copy of /trunk/www/ as green.html.
So it seems to be possible with v1.6 or above. And I'm using svn, version 1.7.6 (r1370777). Additional references:
I think this is because you can't use external files feature between two different repositories (RepoA and repoB in your example).
Have a look to this limitation in the official doc:
http://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-dug-externals.html
Abstract:
The URL for a file external must be in the same repository as the URL that the file external will be inserted into; inter-repository file externals are not supported.
I had the same problem, it seems that you used to be able to have external files in Subversion 1.6 but that 'bug' is now fixed in subversion 1.7! and you can only have external folders from one repo to another, NOT files
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With