On Wed, Jul 25, 2012 at 5:07 PM, Johan Corveleyn <jcorvel_at_gmail.com> wrote:
> On Wed, Jul 25, 2012 at 6:23 PM, Benjamin Fritz <fritzophrenic_at_gmail.com> wrote:
>> I have two repositories and I am using svn:externals to place a
>> directory and a few files from one repository into a working copy of
>> the other.
>>
>> I have the following two svn:externals definitions on a directory in
>> my working copy for the repo-A repository:
>>
>> ^/../repo-B/tools/coverity/scripts scripts
>> ^/../repo-B/tools/coverity/README.txt scripts/README.txt
>
> Wow, so you're ascending beyond the repository root, to refer to
> something from another repository (on the same server). I didn't know
> that worked. I'm not sure if that's a supported use case ...
>
Yup, it works. I'm not sure where I saw this trick, I thought it was
from http://svnbook.red-bean.com/en/1.7/svn.advanced.externals.html
but I just checked and it's not mentioned there. So maybe I just tried
it and saw that it worked. It's nice where I work because I'm not
certain the repository will stay on the same server but I am fairly
certain the two repositories will move together if they do move at
some point.
>> Note that this will create a "scripts" directory from repo-B in
>> repo-A's working copy, and then place a single file from repo-B into
>> the directory from repo-B. This worked fine in 1.6.17, but on upgrade
>> to 1.7.5, I get the following message when I do "svn update":
>>
>> Fetching external item into 'scripts\README.txt':
>> svn: warning: W200007: Unsupported external: url of file external
>> 'http://server/repo-B/tools/coverity/README.txt' is not in repository
>> 'http://server/repo-A'
>>
>> and then:
>>
>> At revision 885.
>> svn: E205011: Failure occurred processing one or more externals definitions
>>
>> I get the same results on Windows XP 64-bit as I do on a Solaris 9 system.
>>
>> I searched the bug tracker for "externals" (155 issues found) but none
>> of the results seemed relevant. The documentation (
>> http://svnbook.red-bean.com/en/1.7/svn.advanced.externals.html ) says
>> that "A file external's URL must always be in the same repository as
>> the URL that the file external will be inserted into," but even though
>> the file is from a different repository in this case, it is being
>> PLACED INTO a directory from the same repository, so I expect it to
>> work (especially since it worked in 1.6.17).
>
> No, what it means is that a file external must come from the same
> repository, not from a different one. That's because file externals
> are implemented internally like a "switch", and "svn switch"-ing
> (without --relocate) also only works if you're switching to some other
> path inside the same repository. So I think this was never intended to
> work, and I'm surprised that it worked for you in 1.6.17.
>
That's interesting that it works like a switch underneath. But it IS
very possible to pull in *directory* externals from other
repositories, which makes me wonder about whether this is relevant.
The explanation works for file externals but doesn't explain why
directory externals from other repositories work.
> Maybe the 1.7 (or 1.7-upgrade) code tightened the checks a bit, by
> normalizing the url's in those external definitions (so it saw that
> those url's are really from a different repository).
>
> Regarding the fact that this worked in 1.6.17: as a test, if you
> replace those "^/../repo-B" url's, in the externals definition, with
> absolute url's including scheme etc, does that still work?
>
Yeah, absolute paths work in 1.6.17, but not in 1.7.5. See the
following transcript from a 1.6.17 working copy. I've removed output
from directories not related to this discussion:
scarecrow_SunOS_btfritz> svn --version
svn, version 1.6.17 (r1128011)
compiled Oct 12 2011, 12:29:56
Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.apache.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).
[snip]
scarecrow_SunOS_btfritz> svn propget svn:externals
##### latest version of scripts and user models #####
http://asvn/ifis-sw/tools/coverity/user_models user_models
http://asvn/ifis-sw/tools/coverity/scripts scripts
# also pull in the readme file
http://asvn/ifis-sw/tools/coverity/README.txt scripts/README.txt
scarecrow_SunOS_btfritz> svn update
Fetching external item into 'user_models'
External at revision 8699.
Fetching external item into 'scripts'
A scripts/compiler_setup_FSA-5000.csh
A scripts/compiler_setup.csh
A scripts/cov5run.csh
Updated external to revision 8699.
Fetching external item into 'scripts/README.txt'
E scripts/README.txt
Updated external to revision 8699.
[updated path here to point to the new Subversion client]
scarecrow_SunOS_btfritz> svn --version
svn, version 1.7.5 (r1336830)
compiled Jun 14 2012, 11:00:46
Copyright (C) 2012 The Apache Software Foundation.
This software consists of contributions made by many people; see the NOTICE
file for more information.
Subversion is open source software, see http://subversion.apache.org/
[snip]
scarecrow_SunOS_btfritz> svn upgrade
Upgraded '.'
Upgraded 'user_models'
Upgraded 'scripts'
scarecrow_SunOS_btfritz> svn update
Updating '.':
Fetching external item into 'user_models':
External at revision 8699.
Fetching external item into 'scripts':
External at revision 8699.
Fetching external item into 'scripts/README.txt':
svn: warning: W200007: Unsupported external: url of file external
'http://asvn/ifis-sw/tools/coverity/README.txt' is not in repository
'http://asvn/ifis-dev'
At revision 889.
svn: E205011: Failure occurred processing one or more externals definitions
Received on 2012-07-26 00:51:40 CEST