Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
675 views
in Technique[技术] by (71.8m points)

svn - Best way to structure a repository in Subversion for Visual Studio projects?

I have a few C# .dll projects which are common to many applications. Currently, I have one big repository. I have each DLL stored as a separate project within the repository and every application project stored as a project within the same repository.

I recently switched to Subversion for source control and I fear that I did not do a good job of structuring the repository. I would like to hear what others are doing.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Subversion repositories are typical sub-divided into:

branch/
tags/
trunk/

You would either place all of your DLL and application projects into the trunk and then use branch and tags for all of them as necessary too:

branch/
tags/
trunk/
    project1/
    project2/

Alternatively, you could create folders for each project in the root and then place the common branch, tags and trunk folders within them.

project1/
    branch/
    tags/
    trunk/

project2/
    branch/
    tags/
    trunk/

Note that this practice is simply convention and nothing in SVN requires (or really promotes) doing it exactly this way. However, everyone is used to it. So, you would be doing people a favor to go along.

To elaborate further, the trunk is where your main development will take place. When you want to mark a particular revision (e.g. a release version), then simply svn copy the project into the tags directory. Also, just copy code into the branch directory when you want to do something dramatic or prolonged and don't want to hinder progress in the trunk. Later you can svn merge your branch back into the trunk when it is ready for action!

If you want to correct mishaps in your current Subverion repository, then just use svn move to relocate them. Unlike the delete and add process of CVS, move will retain version history for the new location.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...