SDC, Part 11: Fixing a bug on a live release

by Lee Wellington 15. June 2010 17:00

In this blog we will look at how to use PureCM in the process of fixing a bug in a live release. As a developer will probably already be working on 'the next release' it is important that switching to a previous release (to fix a bug) is as uncomplicated as possible.

PureCM provides the mechanism for a developer to work on a fix for an old version, and create a new release, without affecting his current development environment – or have his current development environment affect the bug fix environment (parallel development) … So how does it work?

Raise the task

The first stage is to raise a new task on the specific version of the project. A developer can then simply go to his 'My Tasks' view and click on the 'Start' button to populate his workspace with the code of the relevant version. This will avoid inclusion of any new changes that have gone into subsequent versions.

We've already covered how to create a new task, assign it to a developer and start work on it. So assuming that is all in place, the next step is to actually fix the bug.

Annotated File History

This is a good time to highlight an older feature of PureCM that proves very handy in the process of investigating and fixing bugs.. 

We will assume that the developer has debugged the release and managed to isolate the code that is causing the bug. If it is not an obvious bug, then in order to establish if the code was deliberate or just to find out why it was written, then using the annotated history can help…

This provides a quick way of navigating to the changeset that the code was implemented with thus providing the developer with the description, and if this is not enough to make a judgment on how to proceed then the changeset also provides the name of the developer who made the change – a short conversation could clear things up! As well as 'why' the change was made, it could also be useful to know 'when' the change was made in case an older release needs to be fixed.

Now the bug is fixed, the developer has completed some local testing and is keen to get this fix to the customer as soon as possible, therefore a new release is required. Clicking the 'New Release' option on the Version performs this task.

Tim's blog on creating a release has covered the details for this and how to deploy the release files to another machine, typically to build it.

Merging the change into relevant versions

The last stage in this process is to ensure the fix finds its way into other relevant development versions. This can be achieved by using PureCM's merging capability, even automatically using the 'Merge Rules' functionality. 'Merge Rules' will be described in detail later on in the SDC blog series.

So assuming merging is not done automatically, the owner of the target version can manually perform the relevant merges by navigating to 'My Tasks' where any Pending Changes (per version) will be listed ..

Here, I'm the owner of 'Version 2'. Pressing the 'Show' button reveals the list of changesets pending merge into this version. Right click the relevant changeset and choose 'Merge Change' (or 'Exclude' if you don't need this change).

In Summary

Fixing a bug on a live release can be achieved quickly using PureCM ..

  • Create a task specific to the version
  • Use Annotated History to understand the reasons and history of a change
  • Create new release based on the fixed version using the 'Create Release' functionality.
  • Ensure the fix is merged to the relevant Versions using PureCM's merging functionality.

The next blog will look at merging and merge rules in more detail.


Tags: , ,

Best practices | Parallel development | PureCM

Comments

6/18/2010 5:15:18 PM #

SDC, Part 12: Parallel Development with Merge Rules

SDC, Part 12: Parallel Development with Merge Rules

PureCM Blog

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading




Powered by BlogEngine.NET 1.6.0.0