ElectricCommander Best Practices: Versioning

If you have any kind of software development experience you are already familiar with the imperious need to use some kind of Source Control Management (SCM) tool such as Perforce or Subversion. In this article we will explore the available options to use such a system for your Commander development needs.

As of ElectricCommander 4.2.3 there is no automatic versioning of your projects, procedures and steps. However until such a feature becomes available natively, there are other ways to implement versioning.

The first option is to simply use the “copy” button in the UI to duplicate a project or a procedure and rename it by adding a version number. The problem with this approach is that it will clutter your environment very quickly. You can move your procedures into a “storage” project to help with that using the “EC-Utility:Copy Procedure” and for project uncluttering, you can simply remove the “read” permission (thus making the project invisible to users who lack read permissions).  Check the clone() API to copy and move objects automatically.

This approach is best used to simply keep a copy of major releases. I used this approach with my early versions of EC-Admin.

EC-Admin versions

The second option is to connect ElectricCommander to your SCM server to let the latter take care of the versioning. Simply export your projects and/or procedures into a XML file using ectool (or the Perl API) and check the file into your favorite SCM.

This approach works very well because two consecutive exports of the same unmodified object produce the exact same XML file so you can automatically check in and let the SCM decides if a new version needs to be created or not. I would recommend exporting each procedure individually in a project directory for a better granularity. For major releases, simply add a tag or label to your versioned files.

What strategy do you currently use in your enterprise to keep track of your different versions and to help restore something from the past?

In the next installment of this series, we will look on how to use plugins to help manage multiple active versions and to deploy from a test server to a production server.

As usual, please let me know if this topic is useful to you by leaving a comment below or contacting me directly by email.

Laurent Rochette

Laurent Rochette is a Professional Service Engineer with Electric Cloud. He trains customers on our products and help them with deployments and consulting to enable them to use our products effectively. Prior to joining Electric Cloud, Laurent served as an IT Architect at Mentor Graphics. Laurent holds a Master degree in Computer Science from the Grenoble Polytechnic Institute (INPG) in France.

Share this:

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe

Subscribe via RSS
Click here to subscribe to the Electric Cloud Blog via RSS

Subscribe to Blog via Email
Enter your email address to subscribe to this blog and receive notifications of new posts by email.