Name of the blog

Short description of the blog

Creating Versions Retrospectively

PureCM has always had the ability to create streams from a previous changeset but this has been made much simpler with the 2014-2 release.

Create a Version from the Version History


Suppose you are working on Version 2 and have already submitted features A, B and C. You are currently working on feature D.

You now realise that you want to release Version 2 with features A, C and D. You want to release feature B into Version 3.

You can do this by first renaming Version 2 to Version 3. You can then go to the history for Version 3 and select ‘Create Version From’ on the feature A changeset and call it Version 2.

You can now merge feature C from Version 3 into Version 2. So Version 2 now contains features A and C. All developers can now switch their workspace to the new Version 2 and carry on working on Feature D.

You might also consider creating the merge rules ‘Version 1->Version 2’ and ‘Version 2->Version 3’, making submitted changesets pending. This will ensure that submitted changesets are propagated down to the child versions.

You probably also want to delete the merge rule ‘Versions 1->Version3’. Typically you will not want to merge changesets directly from Version 1 to Version 3 – bypassing Version 2.

Create a Release from the Version History


You can also create a release from a changeset in the version history. Simply go to the changeset in the version history and select ‘Create Release From’.

This will create a release including all the changesets up to and including the selected changeset. Later changesets will not be included.

Create a Version from a Release


Another new feature of the 2014/2 release is the ability to create a version from a release. Select the release you want to create a version from and select ‘Create Version From’.

A classic example where this is useful is where you create a release (Release 1.1) from Version 1 and carry on submitting features into Version 1 which will go into Release 1.2. A bug in Release 1.1 now means you need to create Release 1.1.1 as soon as possible. You do not want to include the new features submitted in Version 1 because they have not been tested. The priority is fixing the bug.

So you will create the Version 1.1 from the Release 1.1.

You will then submit the bug fix into Version 1.1. You can then create Release 1.1.1 from Version 1.1. Finally you must not forget to merge the bug fix back into Version 1. It is probably worth creating the merge rule ‘Version 1.1->Version 1’.

File Search Without a Workspace

For as long as I can remember PureCM customers have requested the ability to search server files without creating a workspace. For PureCM customers coming from VSS this was the one VSS feature they missed.

We had a working prototype of this feature 3 years ago but it did not make it into the release because it was too slow and was a performance drain on the server. Finally file search will be available in the 2013/2 release thanks to the redesigned database format introduced in 2011/2, a general improvement in server disk speeds with RAID and better algorithms to perform the search.

How Does It Work


You can right-click any version, release, feature or ad hoc stream and select 'Find In Files'.

From here you can enter the text to search and select whether this is case sensitive. If you select 'Use Regular Expressions' then you can enter a regular expression instead of plain text - but this will only be matched for each individual line.

If necessary you can specify a subfolder of the stream you selected to narrow the search as well as the file extensions to consider.

On pressing Find All a list of files matching the search will appear and you can stop the search at any time with the Stop Search button.

Double clicking a file will open the editor for this file with the first match selected. You can expand a file to reveal the text for the first 3 lines which match. Double-clicking on these lines will open the editor with the match in that line selected.

What is the Performance Like


Within our test environment we found that searching a 10GB stream with 35,000 files took 40 seconds. This is obviously an extreme case - typically you will be searching in a much smaller subfolder. We also found that performing the search had very little impact on the PureCM server responsiveness. Other developers can carry on working without any impact on performance. If multiple searches are performed then the performance for each search will be effected but this will have little effect on other developers updating or submitting.

File search can be performed in the PureCM GUI, the command line or the Visual Studio extension.

Jenkins and Hudson Plugins coming soon in 2013/2

With the 2013/2 release now less than a month away we wanted to outline some of the major new features.

One of the biggest features of the 2013/2 release is the plugin for Jenkins and Hudson. In case you did not know Jenkins/Hudson is an open source Continuous Integration tool similar to CruiseControl. Hudson was the original application but this was forked in 2010 by unhappy open source developers to create Jenkins.


PureCM already has plugins for CruiseControl.NET and FinalBuilder - so why do we want another CI plugin?


Firstly Jenkins/Hudson has possibly become the most widely used continuous integration tool. This is down to it's active open source community, ease of installation, ease of use and number of plugins. So if you are looking to choose a new CI tool - CruiseControl, Jenkins and FinalBuilder are 3 of the best available.

Secondly we already have customers who are using Jenkins and Hudson. So if you are already using Jenkins/Hudson then it will be simple to install the PureCM plugin and get going with the PureCM streams.

The final benefit is that Jenkins/Hudson is cross-platform and is more commonly run on a linux server. This is not the case for FinalBuilder or CruiseControl.NET.


What does the plugin do?


Similar to the CruiseControl plugin the plugin allows Jenkins/Hudson to check if any submits have been performed against a stream and update the workspace to get the latest code. Jenkins/Hudson goes a bit further than CruiseControl in that it lets you browse the workspace files. It also gives you more details about the change - like what files have been added, edited and deleted.


When will the plugins be available?


Unfortunately the plugin required some changes to the pcm command line so they will not be available until the release of 2013/2 in October 2013. If you want to get a beta version of 2013/2 along with the plugin please email and we will send you the details.

Ignoring Files with pcmignore Files

One of the key features of the 2012/2 PureCM release is the introduction of pcmignore files. I want to explain what they are and how they can make life easier for you. If you are familiar with gitignore files then we have some good news - they are identical.


The Problem – The Ignore File Paths Policy


More often than not there are files in a workspace which you do not want to control. These might include user option files or build files. The previous way of handling this in PureCM was to update the 'Ignore File Paths' policy. So the policy might include the pattern '*.obj' to ensure object files are not added to PureCM.

This policy will carry on working the same as before so if this is working well for you there is no need to change anything. But you may not like this way of working for one or more of these reasons:

  • It is difficult to maintain the 'Ignore File Paths' policy, especially if you have different patterns for different streams. If you decide you want to add a new pattern you have to update this policy in each policyset.
  • Users need to access the Administration view to update the policy. It is unreasonable to expect all developer to become familiar with PureCM policies.
  • Users need to be a Policy Administrator to update the policy. It is very common that an Administrator would not want all users to be able to update all policies.
  • You cannot specify complicated rules. For example you could not say "Exclude all files in a 'Debug' directory except the files in '/src/Debug'".

For these reasons many users have stopped using the 'Ignore File Paths' policy preferring to manually remember which files to not add. But this approach is not recommended for the following reasons:

  • New developers might not know which files to exclude.
  • You are less likely to run the Check Consistency Wizard which makes it more likely that you will forget to add a new file.
  • You cannot use the 'Monitor the workspace for file changes' feature which will automatically add files to your workspace when you create them.


Better in Every Way - pcmignore Files


Using pcmignore files will resolves all these issues. A pcmignore file specifies any number of exclude and include patterns. This is similar to the 'Ignore File Paths' patterns but you can specify include patterns the same as exclude.

When you put the pcmignore file in a folder, the include and exclude rules are applied to that folder and any subfolders. So it is easy to specify complex rules like "Exclude all files in a 'Debug' directory except the files in '/src/Debug'". The root pcmignore file will have a rule to exclude all files in a Debug directory. The 'src' directory has a pcmignore file with a rule to include the Debug directory.

The pcmignore files are submitted to PureCM the same as any other file. Other developers start using the new pcmignore rules after they update their workspace. Developers can add new rules or update existing rules easily by checking out the pcmignore file, updating it and submitting the change.


Switching Over


Hopefully you are eager to start using the new pcmignore files. To get going you need to add a file with the name '.pcmignore' at the root of your workspace. This file contains all the exclude and include rules which apply to all folders in the workspace. You can download a good starting point from here.

Note: If you create a new stream from scratch then the default .pcmignore file is added automatically.

There are many example gitignore files which you can download here. pcmignore files and gitignore files are identical, you can even call the file .gitignore.

After adding the root pcmignore file you can go through each entry in the 'Ignore File Paths' and add any useful patterns to the pcmignore file.

The best approach is then to clear your 'Ignore File Paths' policy and run check consistency on a workspace where everything has been built. Look at the files which PureCM wants to add and add them to the pcmignore file. Keep doing this until running check consistency finds no new files.

Flicking Between File Revisions

With the upcoming release of PureCM 2012/1, I expect you will hear a lot about the new web client and performance improvements. But as a developer it is the file history differences window which I am most excited about.

The file history dialog has been redesigned with a tab view at the bottom. The tab view displays contextual information about the selected revision. Initially the Description tab will be selected – showing the changeset description for the selected revision.

Things get interesting when you select the Differences tab. This displays the familiar differences tool showing the changes made in that revision.

So you can quickly switch between revisions of a file to view the changes. This becomes very useful if a file has been changed many times and you are trying to isolate when or why some code was changed.

Note that the File History Dialog will need to be large to show the differences. If the File History Dialog is docked then you can right-click the tab and select ‘Float’ to make more room.

The Annotated History can be used for a similar purpose – but the Annotated History only shows when a line was last changed. Maybe the line was changed in a later revision but this change is not interesting to you? Or maybe you do know exactly which line has been changed? Maybe you know that the file has changed at some point and want to know what the exact changes were.

If you are very perceptive you might have also noticed that there is a new ‘Move to First Difference’ option at the top. If this is selected then when you move to a new revision the Differences tab will automatically select the first difference. This is what you want if you are browsing the changes made to a file. If this is not selected then the Differences tab will stay at the same line when switching revisions. This is what you want if you are looking for changes to a particular line.

You will be glad to hear that the Differences tab works for image files in the same way. It also works for Word and Excel files if they have been setup for xml post-processing.

Working Outside of Visual Studio

Having used the PureCM Visual Studio Client for a couple of years I got a real shock when I had to do some work in Xcode. Creating a read-only workspace and checking out the files manually sounded like way too much overhead. So I created a writable workspace and ran check consistency when I needed to submit. This worked ok, but I really missed the way the PureCM Visual Studio client tracks which files I am editing. So when I got my hands on our 2011/2 beta the first thing I wanted to try was the workspace monitor.

If you flag a workspace as monitored, then PureCM will keep track of when files are added, edited or deleted and automatically check them out. If I leave my PureCM GUI open on the desktop, it is updated immediately as I edit files in Xcode or any other editor. So I can keep track of what files have changed without running the consistency checker every 5 minutes.

When I ran multiple PureCM clients, I was really impressed with how well they synchronized with each other. When I perform a submit in the PureCM GUI, the Explorer and Visual Studio clients will refresh immediately. In particular the Explorer client becomes a lot more useful. I didn’t use this much before because the icons were always needed to be refreshed but I have found I am using it more and more with the new release.

This is just one of the new features in the 2011/2 release. I’ll keep you posted with other new features over the next few weeks. One of the things I am most excited about is the performance – submitting and updating seem to be lightning quick. We are in the process of comparing the times with the other tools on the market. It is looking like 2011/2 will make PureCM the fastest version control tool on the market.

AVC 2: PureCM and Agile


In this post I would like to explore more of the Agile Manifesto and how it relates to software development and to delve into some of the reasoning behind why PureCM was designed and built the way it is.

Individual interactions over processes and tools. A cynic might look at this and say this means there is no need for software tools, but that's the point at all. Software tools are helpful and in many cases necessary but your tools should not define your process and you shouldn't be overly dependent on tools for communication. In Agile the right process is the one that works and over time teams might be changing, tweaking, rearranging process to find what works.

In order for an SCM system to be effective in this type of environment in needs to be flexible and adapt to the process instead of imposing process. The right tool is the one that works for you. I want to mention a long time complaint I have had with several SCM systems that impose process either intentionally or through lack of capability. For example AccuRev is a  system where mainline development as an intentional strategy is not supported and Perforce, VSS, CVS only mainline development as a strategy is supported (generally speaking) due to lack of capability.

PureCM has the ability to do basic mainline or complex branch heavy development strategies with any number of combinations in between due to not having a locked workflow and while also having strong capabilities which allow users to adapt PureCM to their process and not the other way around. Change is continuous in the agile flavors and unless it's not practical to think one could go out and buy a whole new set of tools after each tweak to the process, so having tools that can adapt with the right amount of configurability (built in options) is important.

Working software over comprehensive documentation. This entry in the manifesto is a cross-hairs pointed squarely at the waterfall process where every feature and function is documented in great detail before a project even begins. This approach has many pitfalls but in brief what you end up doing is either wasting a ton of time documenting features that never get built (for whatever reason) or adhere so strictly to the original documentation that you lose all ability to adjust to changing market/customer/technology demands over time.

PureCM has adopted a strategy to manage metadata information at the most minimal levels but I will detail this with when I get into Scrum, in short the PureCM task can be reduced to a one-sentence entry and expanded upon over time, detail increases as priority increases so you only spend time documenting features with a high probability of going into development.

Customer collaboration over contract negotiation. Here is part of the manifesto that puts emphasis on including the customer or the key stake holders in the software development process. This can take on different forms in practice from user acceptance testing by the customer, or demo of new features after increments.

PureCM can be a facilitator to this process but it depends on how collaboration is defined and adapted by the team, I will provide several examples once we are Scrumming.

Responding to change over following a plan. Another pitfall of the waterfall process. A lot of software teams might spend months or years working on a project using the original requirements documentation approved by the customer only to find at the end of it all the customer was not happy with the result or conditions in the market had changed enough to make features obsolete before they were even released. With the Scrum adaptation instead of planning out an entire project and a year's worth of effort in advance you plan out short increments called Sprints and this allows priorities to shift in short time to meet the changing demands of the customer.


With PureCM it is possible to actually manage your software development effort by sprints and I will get into greater detail in forthcoming posts so stay tuned!

AVC 1: Agile vs Scrum


Let's get this Agile Version Control (AVC) series started with a little discussion...

It is important right off the bat to look at the definition of Agile versus the definition of Scrum. We'll talk about Agile and Scrum (and even more things) later on, so it's worth looking at these in more detail.

Agile itself is not a specific way of working, it is generic set of principles or priorities which are outlined in the Agile Manifesto. These are listed as:

  • Individual interactions over processes and tools
  • Working software over comprehensive documentation
  • Customer collaboration over contract negotiation
  • Responding to change over following a plan

In brief, this is Agile. There are a dozen or so additional principles you can add on that are important, like self-organizing teams, sustainable working pace, but these are also covered in the individual Agile flavors so not as important to list here as I can get into those details later.

Scrum is a specific flavor of Agile, specifically it is referred to as an agile project management framework. It draws on the principles of the Agile Manifesto but goes into detail to define day-to-day activities and how to manage a project in a specific way. 

Agile is not about just having daily standup meetings or deciding to swap one feature for another during a development cycle based on customer demands. These actions do exist in Scrum but you are not scrumming if you just have daily standup meetings, there is a lot more to Scrum and perhaps the most important aspect is how teams are managed and organized, in short they manage and organize themselves, there is no project or product manager anymore and teams are empowered to make decisions and solve problems on their own as opposed to being micromanaged. It is the first thing I noticed about Scrum. 

..but why is this important?

Because in the design and construction of PureCM there are facets of the product which will mesh with principles of Agile and will therefore be applicable to many different flavors of Agile, but because my flavor of choice is Scrum that is where I will go into details (though I will try to mention others here and there). 

There is a vast multitude of SCM and version control systems available today. Many of them will claim to be Agile. Many of these will cite specific features or points of interest like code reviews and continuous integration. Often these are features the tools had before claiming to be agile but are now being marketed as 'Agile' capabilities retroactively. With PureCM what we will show is how you can follow the principles of the Agile Manifesto first and then second how nicely PureCM adapts to Scrum and how this is a ground up effort that makes PureCM truly Agile and Scrum compatible and not just offering rebranded legacy features here and there and calling it agile.

So we've properly started the series - I look forward to continuing our journey! 


New Blog Series: Agile Version Control

A few months ago we've run our first blog series, publishing about a dozen blogs on how common software challenges can be tackled effectively. The SDC series was born. We've had some great conversations with readers and customers as result of that blog series, so I'm glad to announce the next series that will start soon:

Agile Version Control

Hmm. Agile in 2011? Ten years after the agile manifesto was published? Of course! These 10 years have brought many rich experiences working with agile and other methodologies in software development. We still get numerous rich and insightful discussions with our customers about what could be done better. And at the same time, we're also confronted with "how to" questions from teams getting started with agile: How to make version control or software configuration management (SCM) agile?

It's seems to be a small part of the development process only, and yet getting it right is a key success factor to any agile initiative. So join our upcoming agile version control series to get in touch with best practices and let me know about your thoughts.