Subversion repository layout for libraries developed across different programs

不问归期 提交于 2019-12-02 17:42:24

Well, I guess I disagree that externals are out of the question. I've had a similar problem in the past. I solved it using the svn property externals.

Create your library repositories:

svnadmin create /path/library1
svnadmin create /path/library2
...

Create client repositories:

svnadmin create /path/program1
svnadmin create /path/program2
...

Now declare the libraries as external within the program repositories:

cd /path/program1
svn propset svn:externals "library1 svnpath://wherever/library1/trunk/" .
svn propset svn:externals "library2 svnpath://wherever2/library2/trunk/" .

Now then you can make changes to programs 1 & 2 and making commits at the root of those projects doesn't affect the libraries... but, if you needed to make changes to the libraries you can. Then if and only if you have write permissions to the library repositories you could commit those changes too - but only from the library's subdirectory.

I.e. this doesn't make a commit to the libraries...

... make a change in /path/program1/library1 ... 
cd /path/program1
svn commit -m "some change"

This commits the change made in the library above:

cd /path/program1/library1
svn commit -m "change to library code"

Why does the source for the library have to exist in the program tree. Compile your libraries separately and link them into your programs.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!