开发者

Can a single solution hold projects from multiple repositories?

I've begun setting up SVN repositories to store my code, and am wondering if a single Visual Studio solution can have projects from multiple repositories. I have a shared library with different helper functions, generic custom controls, etc, that are used by multiple projects, and hosted in its own repository. Then I have my project repository, 开发者_如何转开发which contains all of the program-specific code such as forms, etc. I know I could copy the shared library into the program's repository, then copy them back when I make changes, but I'd much rather keep them in different repositories so I can hit "Commit" and the general library commits to it's repository, and the program code commits to it. I'm currently using AnkhSVN, but if it's possible with other tools, I'll look into it.


Preemptive clarification for all the "just use one repository" answers: The shared library is hosted in an online repository, viewable by anyone, but the program code is proprietary and resides on our office servers, so they need different repositories.


Yes it can, though you'll only be able to commit to projects from one repository at a time. One way of achieving this and making it reproducible by any developer who checks out your project is to use the svn:externals property on your solution's root folder to pull in projects from other repositories.

To edit or add this property, you can either use the svn command line, or TortoiseSVN. You'll find more details on the svn:externals property itself in the Subversion red book.


Like David says this is possible.

I would like to add to this that having multiple repositories not only takes away the ability to atomically commit, but also you won't be able to branch/tag the project and its dependencies into a single tag or branch. I wouldn't recommend using multiple repositories for these reasons.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜