Sean's Blog

My Development Blog

  Home  |   Contact  |   Syndication    |   Login
  16 Posts | 0 Stories | 93 Comments | 0 Trackbacks

News

Twitter












Archives

.NET Development

Some colleagues and I are in the process of revising/introducing some Configuration Management best-practices at the company we work for. In particular, we are introducing a new concurrent source control system (Subversion) and we have had a couple of healthy debates come up in regard to what should/shouldn’t get committed to source control.

On one side, we have those with a more purist belief that only the following should be committed to source control:

  1. Anything necessary to build the project (e.g., source code and any 3rd party libraries that your project makes use of)
  2. Related objects, such as images or flash files that are required to deploy a website

In another we camp, we have those that believe in using the source control system for more than just source:

  1. Anything necessary to build the project (e.g., source code and any 3rd party libraries that your project makes use of)
  2. Related objects, such as images or flash files that are required to deploy a website
  3. The compiled assemblies at the end of each build
  4. Related documents (e.g., project timeline, requirements, etc.)

In regard to the first camp, nobody disagrees with the value of having the ability to grab components related to a specific build, at any point in time. For example, if a client asks for release 1.7.9.132, it’s imperative we have the ability to grab that release quickly and that it be identical to the original release (for example, not compiled under a new version of the compiler). Their argument is that committing the compiled assemblies into source control will clutter the repository without adding value. Their preference is to maintain a separate location on a file server, which is designated to storing versioned releases in a hierarchal fashion, on the file system.

The above mentioned concept could easily be implemented by a manual process or a build process that is run on a Continuous Integration server at the time the source is committed to the trunk; however, the less purist camp believes in providing a “one stop shop” for everything.

Another concern of the purist camp is that concurrent version control systems do not lend themselves nicely to working with binary documents (e.g., Word files). For example, to ensure that no two people work on the same binary document, at the same time, document authors must first lock the file before making edits. While this could work, another author may attempt to edit the file at the same time, not realizing the file has been locked (often, an svn commit is required before any subsequent users realize that the file has been locked). This will cause any subsequent user with having to “shelve” their changes and manually merge them, at another time. It is believed that a document control server, such as SharePoint, would better suit document versioning.

For those that have gone down this path, could you please share your words of wisdom?

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
posted on Wednesday, January 27, 2010 12:01 PM

Feedback

# re: Opinion Wanted: Source Control Best Practices 1/27/2010 2:01 PM Philip Best
Why not Mercurial, I wonder?

Regardless, I agree with your purist colleagues. While it may seem logical to group all those things that belong to the project in one place, reality has a way of defeating those good intentions. The purpose of a source control system is to provide a convenient means of building a particular version of product at any point in time. Storing the resulting binaries is, at the very least, redundant. On the subject of documents, they are indeed best left to a document management system if you have one. You won't get true versioning in either a source control system or a document management system but the document management system will handle the document metadata much more robustly. I think you'll be happier with documents there.

# re: Opinion Wanted: Source Control Best Practices 1/30/2010 9:40 PM Sean
I would have preferred to go with a distributed source control system, but I'm glad to be moving away from our previous system, which was a nightmare.

# re: Opinion Wanted: Source Control Best Practices 2/1/2010 6:03 PM Charles
Why would anybody store the binaries? It doesn't add anything of value. I agree with the purists. Store it on a file server.

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: