Hi,
For many years, I have been programming in a simple way: I would save my source files in directories organized by language and project, make the occasional manual backup, and if I’m smart, I make a copy before trying out a new version; that’s pretty much it.
I recently decided to begin using revision control. After examining a bunch of articles and pages, and trying out quite a few different ones, I eventually settled on Subversion (even though it doubles the size of the project due to the BASE).
I now need some advice on a few aspects that I cannot seem to find useful information on. First I am checking that I have the basic process of using an RCS correct:
- import all my projects into SVN repositories
- delete the originals
- check out a project from the repository
- work on it
- commit it
That’s it? So what about new projects? Do I have to create a new project in a folder then import it?
I’m also having trouble with the directory structure, but first, I should probably lay out my setup. I am a single developer working on my home machine. I have in my Data directory the following sort of layout:
X:\Data
\H
\3rdParty
\Graphics
\Controls
\ThisControl
\ThatControl
\Libraries
\Classes
\CFoo
\CBar
\VC
\Big
\CoolApp
\res
\Small
\CoolerApp
\res
\misc
\Test
\CFooTest
…and so on.
I have several of the header directories that I use often (eg 3rdParty\Graphics, Classes\CFoo, etc.) in the Include path of my IDE. The dependencies were already problematic before, but now with RCS, it’s even worse. For example, CoolApp may include ThisControl and CFoo. Previously, this would have been less than ideal since if I modified CFoo while working on CoolApp and broke it, other apps that use it like CoolerApp would thus be broken as well.
The reason I did it this way instead of copying CFoo et. al. to CoolApp’s and the others’ directories is because of the hassle of trying to merge the updates from each copy back to the main copy in the \H folder.
I would have thought that by using a formal RCS, this sort of problem would be obviated. However, what has now happened is that when I import the projects from \VC\CoolApp, etc. into the SVN repositories, the components like CFoo, Libraries\* etc. do not get included since they are in an external directory, and thus are not versioned—thus defeating the whole point.
I am looking for tips on how to deal with this sort of situation. For example if I have CWidget in \H, and WidgetTest (a test container that includes CWidget) in \VC, then how would I structure things such that both WidgetTest and CWidget get versioned, while at the same simplifying it as much as possible for other apps that use CWidget to include and use the latest version of it?
Also, I have only been able to import all of my projects into the same repository directory, losing the *Big\*, *Small\*, *Test\*, etc. structure. I can’t get Subversion to keep that.
Finally, what becomes of the original project directories? I’ve seen at least one article that says that they can be deleted once they are imported to the repository. If so, I’ll probably just ZIP them up and put them away.
Oh, and I currently have Subversion set up with my Apache server, as well as VisualSVN, SVNServe, and CollabNet SVN Server installed. I have gotten each one to work, but would love some advice on which to use since I’m sure I only need one.
Thank you very much.