Short tutorial on svn propset for svn:externals property login
Subversion has a nice way of including the content of one repository into another repository. This is useful e.g. when you have a repository with common routines that you want to use in multiple projects but you don't want to duplicate the common code in multiple repositories (for obvious reasons).
svn:externals property you can tell subversion to fetch content of external repository in a given directory. However, the documentation of
svn:externals is weak so this post hopefully will save someone time googling and figuring out how it works.
svn:externals property on an existing directory. The value of this property is a list of directory/repository path values, separated by spaces.
The best way to explain this is using an example. Usually you would use just one external repository, but I'll use two in the example, just to show how to create a list.
Let's assume that you have external subversion repositories
repo_one in directory
dir_of_repo_two. Create a text file with the value of
svn:externals property. Each list item is in it's own line, dir name is separated from repo path by whitespace e.g.:
$ cat >svn_ext_val.txtNow set the property on any directory already in subversion. In the example it's the current directory:
svn propset svn:externals . -F svn_ext_val.txtNow when you do
dir_of_repo_onewill be created with the content of
dir_of_repo_twowith the content of
Voila! Pretty simple but you wouldn't know that just by reading the docs.
|Newer article:||Sumatra PDF 0.2 released|
|Older article:||Sumatra PDF is born|