tag:kinderman.net,2005:/tag/controlkinderman.net : Tag control, everything about controlcode code code2007-09-22T08:43:50-07:00Typotag:kinderman.net,2005:Article/52006-04-17T11:58:00-07:002007-09-22T08:43:50-07:00ryanUsing a Version Control System<p>
The point of using a version control system (VCS) is to track versions of source files in a project, with the idea that building software is complex and it's often difficult to keep track of all of the changes that were made from one revision of a code base to another. If changes that were made cannot be tracked, there is no way to account for unforseen consequences of making a change to source code, such as breaking the build, failing QA regression tests, or negatively affecting performance. A VCS allows you to easily compare one version of a source file to another and figure out what you did to the latest revision, and to revert back to a previous version if necessary. It also allows large teams of developers to work on the same code base at once, by providing them with the ability to merge changes that they have made to the same source artifact, if necessary. For these reasons, the only things that should be checked into a VCS (as far as I can think of, anyways) are the buildable artifacts in a software development project, along with the non-buildable artifacts that the buildable artifacts depend upon.
</p>
<p>
Binary files that are not part of the build process are generally not a good fit for inclusion in a VCS, because it's difficult to see exactly what changed from one version to another, and nearly impossible to combine changes made to the same binary file by two or more people. This defeats the point of using version control to begin with. Another reason why binary files are not a good fit is that, with most version control systems (<a href="http://svnbook.red-bean.com/en/1.1/svn-book.html#svn-ap-a-sect-8">Subversion excluded</a>), any minor change to said file results in an entirely new copy of that file being stored in the repository, along with any previous versions that might exist, and there is no way to reliably remove the previous versions of the file without removing all files that changed in that revision. This results in a nearly irreversably huge repository.
</p>
<p>
I've personally worked with <a href="http://www.nongnu.org/cvs/">CVS</a>, <a href="http://subversion.tigris.org/">Subversion</a>, and <a href="http://msdn.microsoft.com/ssafe/">SourceSafe</a>. Of those, only SourceSafe allowed me to permanently delete individual files. However, this had a number of nasty consequences, mostly having something to do with SourceSafe not properly cleaning up references to deleted files and generally confusing itself, because <a href="http://www.developsense.com/testing/VSSDefects.html">SourceSafe sucks</a>.
</p>
<p>
If you're free to choose the version control system you use, I'd highly suggest starting with Subversion. It's an offshoot of the older CVS, and addresses a number of shortcomings with that system. A comparison between CVS and Subversion can be found <a href="http://svnbook.red-bean.com/en/1.1/svn-book.html#svn-ap-a">here</a>. If you're using SourceSafe now, do yourself a favor and stop. Subversion is stable, mature, well-supported, well-documented, and open-source.
</p>