Click here to Skip to main content
15,889,838 members
Articles / Product Showcase
Article

Version Control: Friend or Foe?

8 May 2008CPOL7 min read 21.2K   7  
Learn how to turn the latter into the former, and how a pragmatic approach to software configuration management can significantly improve your development efforts.

This article is in the Product Showcase section for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers.

Image 1

Why You Might Think the Latter...

Having quite some exposure to various software development shops, it is still surprising how people think about version control. You either love it or hate it. Those who love it are obviously happy. For those who hate it, comments like, “It’s just another layer of complexity, so why bother?” might best describe the attitude.

This is surprising, because if you are working in a smaller shop that is closely collaborating with its customers, you want to be able to respond to feedback as quickly as possible. In such a situation, working without an SCM tool (or using an old-fashioned one) inevitably leads to frustration. If complaints like, “Tom, you haven’t just worked on this file, have you? My changes have gone!” sound familiar to you, solving the underlying factors becomes crucial to avoid quality issues and costly rework.

PureCM Tackles Your Complexity Challenge

As a developer, you have to use the tool. It is as simple as that. If a tool is not easy to install and easy to get started with, you will not use it. This is why PureCM uses a lightweight client/server architecture that does not need any additional infrastructure. It comes with a secure and performance-optimised database at no additional cost, and you can run the server on the same machine as your client if you wish to do so. You can perform your daily operations like check-out and check-in within Visual Studio, or use the cross-platform GUI for advanced options. This setup allows you to start working within hours, rather than days or even weeks.

VS_plugin_600.png

To facilitate merging, PureCM includes powerful visualisation tools to resolve conflicts when checking in finished changes. A three-step wizard guides you through the process, where you can choose the actions to perform and the changes to be merged (i.e. “cherry picking” changes).

cherrypicking1_600.png cherrypicking2_600.png cherrypicking3_600.png

If you need to analyse differences between branches, use the “stream comparer” to present them graphically. Start on stream level (aka branch) to see which folders and files have been added, deleted or changed, and then drill down to individual file differences on a line-by-line basis. This only requires a simple double-click on the file or folder you want to see in more detail.

stream_comparer_600.png

Manage Your Teamwork Using Tasks

Each development shop works slightly different, and you will want to organise the development lifecycle according to your needs and maybe even adapted to different project types. This is the reason why PureCM is designed to be as flexible as you would wish, giving you all the transparency you need to keep track of your development. How is this possible? By focusing on the smallest common denominator: tasks. If you are used to tools like Source Safe or CVS, you need to change your perspective on SCM. Stop focusing on individual file changes and start looking at tasks instead.

This shift has major implications: suddenly changes made by developers refer to a specific customer requirement, be it a bug, an enhancement or just an issue in general. In PureCM, a changeset is the collection of files that make up the solution to a specific issue. PureCM allows you to identify where a specific changeset was merged, at what time and by whom.

merge_tracking_600.png

As a changeset is a meaningful set of file changes, they are a very powerful concept for code review, too. Just chose a specific changeset for review; accept it, or roll back the changeset in case you reject it. Testing changes locally before check-in is another example of where the use of changesets makes it much easier for developers to carry out quality improvement practices.

As you can see, focusing on tasks implies much more than just using atomic commits when submitting changes to the database. It is a philosophy that applies throughout the development lifecycle, and thus throughout PureCM. In this case, performing actions such as merging changes into another release, or even another related product, without losing track of the changeset history becomes very easy. Atomic commits guarantee database integrity, but do not improve your software development process.

Revert to the Last Stable Version when Needed

Even in the best teams, errors occur from time to time. So you need the possibility to roll back to your last stable version. As you can easily identify changesets in PureCM, just revert them (or go back to the last successful build) and then start fixing the problem. Given the fact that you are dealing with a meaningful set of changes makes it easier for you to understand what has gone wrong.

In order to prevent such things from happening, developers can checkpoint their work on the PureCM server at any time without actually submitting their code to the codeline. In this way, a meaningful changeset can be developed and tested locally without interfering with your stable codebase.

Manage Parallel Development

Depending on how parallel you want to work, you can distinguish two levels. First, you allow developers to check out the same files from a specific branch at the same time, eventually resolving resulting conflicts when checking in the changes. Second, you use branching to prevent development from stopping during code freezes, e.g. while testing.

To manage the first level, use PureCM’s policy-based security to control, whether you want to allow multiple checkouts or whether you want to lock files that are checked out. These policies can be specified per file type, e.g. to allow multiple check-out for text files, but locking binary files.

policy_admin.png

When you consider using branches for parallel development, you need a tool that gives you the flexibility you need. To achieve this, PureCM uses the concept of “streams” to represent codelines. As such, streams can be used to represent branches AND labels. This is possible as streams are not file copies, but references to a specific version of your code. It is then up to you whether you want to prevent changes to a stream (i.e. using it as a label), or whether it is used as a branch. The policy for a stream can also be set per user group, e.g. allowing write access on a release stream to senior developers only. This lightweight approach allows for an incredibly flexible handling of branching, where best practices like branch-per-purpose (development, QA, release) or branch-per-task can be applied.

Combine streams with the changeset perspective and merging becomes much clearer. Start pushing a changeset (e.g. a bug fix) from a customer release stream to your development stream. Or from a temporary development stream into your main development stream. In order to do this, you just have to select the changeset(s) you want to merge and define the target stream. PureCM’s “Quick merge” automatically makes the merge for you. In case of merge conflicts, the tool automatically brings up the graphical resolve tool.

resolve_600.png

Conclusion – or About the Making of Friends

If you considered version control as being your foe before reading this article, I hope that it has shaken your belief somewhat. Of course, there are no friendships without personal fit and close contact. In the world of software development tools, a trial is the best way to achieve this. So give it a try and download PureCM for free to test all its features for 2 users.

But before you do anything else, share your thoughts and experiences with us. How do you think about SCM? Where do you see its most important benefits and shortcomings? What experiences have you made so far?

About PureCM

PureCM is a Software Configuration Management (SCM) solution that controls and tracks changes to digital assets. PureCM facilitates and speeds up development in team environments using the leading concept of stream-based branching and merging. Complete with integrated Issue Management functionality, PureCM can be tailored to any development and change management process. PureCM excels in task-oriented environments, where productivity and security are optimised using local workspaces combined with a client/server architecture.

Both the PureCM client and server are available across multiple platforms such as Windows, Linux, and Mac. Offering native integration with Visual Studio®, PureCM is easy to use and easy to deploy, and thus particularly well-suited for today’s dynamic environment.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --