Reputation: 11
We have a repository named "nagios" with the following paths under it:
common/nagios/etc
common/nagios/objects
FTW/nagios/etc
FTW/nagios/etc/objects
DAL/nagios/etc
DAL/nagios/etc/objects
As you can see the directory structures below "common", "DAL" and "FTW" are identitical.
I'd like to be able to checkout (not export) the "common" paths first, e.g. (cd /usr/local):
svn co http://foobar/repo/nagios/common/nagios nagios
Then, depending on which client site (server) I'm on, checkout that site's specific files, e.g.:
svn co http://foobar/repo/nagios/FTW/nagios nagios
Which gives me the error: svn: 'nagios' is already a working copy for a different URL
Note: there are no identical/overlapping files between "commmon" and "FTW" (or "DAL")
I've tried to accomplish this several ways including using "svn:externals" (which gets me close, but creates a new directory structure under the existing one - ../nagios/nagios/etc/...).
The object here is to maintain all of the files that are common to each site in a single location and the site specific files in each of their own directories in the repo and be able to checkout the common ones and the site specific ones to the same working directory paths.
Upvotes: 1
Views: 2501
Reputation: 97282
You can get needed result, while and if
Solution is file-based externals: re-read carefully "Externals Definitions" in SVN-Book, starting from words
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.
I.e you files in common/nagios/etc
+ common/nagios/objects
will be maintained files, files inside HOST-tree - externals to files in COMMON (if all files have unique names). Checkouted HOST-tree will have all files in Working Copy (if externals wasn't disabled on checkout)
Upvotes: 2