Reputation: 141
Some background information on what I'm doing
I'm using Altium Designer for PCB design and I'd like to have a folder particular folder structure setup.
Template
FolderA
Folder_common_a
Folder_common_b
FolderC
FolderD
FolderE
Folder_common_a
Folder_common_b
FolderC
FolderD
Folder_common_a and Folder_common_b will be common to all subfolders of Template. They will always contain the exact same files and folders. They will include necessary files that are required for any project. Sure I can just create a copy, but if I were to change something or add something in those folders, then I would need to recopy those folders into every subfolder. Right now its ok, but this list will grow and it becomes more of a pain to actually do it that way.
What I would like is to keep the folders_common_a and folders_common_b seperate and link them into the subfolders. This way, if I were change something, the next time someone checkouts the appropiate template they need, those files/folders would up to date with the latest and greatest.
I'm fairly new to the SVN, I basically just checkout and commit. Nothing really more than that.
Any way I can get link a repo to another repo, so that when I checkout the templates, I also checkout the common folder repo as well ?
Upvotes: 2
Views: 1826
Reputation: 413
Add the SVN-property svn:externals to the parent folders:
FolderA
FolderE
And add new targets to each property (Local-path -> URL):
Folder_common_a -> file:///C:/somewhere
Folder_common_b -> file:///C:/somewhere
Commit your changed SVN-properties.
And on the next checkout/update you should receive your linked folder content.
Further details: How to get started with svn:externals?
Upvotes: 2
Reputation: 97270
It's well-known and widely used in SVN-world technology - SVN externals
You can create somewhere outside "normal" tree these two (real) folders with content and mount also as folders into any other locations any amount of time.
lib
on this picture is such externals, link to folder in another repository. You can checkout externals playground freely and play with it (see also at /tags samples)
All changes in parent physical folder will appear in logical folders
You can't get Folder_common_a + Folder_common_b appearing automagically in created by hand parent folders, but it's a question of single svn propset -F ...
with permanent data-file for externals definition
Upvotes: 2