September 2, 2010

Visualizing the Perforce Directory Standard


Tom's recent post about the Perforce Directory Standard (PDS) generated quite a bit of interest. Creating and maintaining a solid branch and directory model is a common SCM challenge, and the PDS is a great starting point.

Another challenge is communicating the PDS to the users. The value of the PDS is greatly enhanced if users understand how it impacts the development process. If you understand the branching patterns in the PDS, you’ll understand why we merge a bug fix through main instead of grabbing it directly from a release branch.

In the interest of using a picture to save a thousand words, I wrote a quick template for a PDS P4V applet. I assumed I was managing three products, using different branching patterns for each product. The applet has a bit of summary information about branching patterns and models, but most importantly, it has pictures! The applet presents simple branch diagrams for the three products, illustrating the flow of change for each product. A couple of screenshots are shown below.

PDS Applet in P4V

PDS Branch Diagram
PDS Branch Diagram for Customization Model

The applet and more screenshots are available in the Public Depot. You can customize it for your own branching patterns and products. The diagrams are generated using native HTML canvas capabilities, so you can easily create updated diagrams as your products evolve.

The applet is a very simple example of visualizing the PDS, but it has the advantage of being present in P4V, which is one place developers tend to spend a lot of time.

PS I've updated the Integration Preview applet I wrote about earlier, adding a couple new features. There's also a simple applet that displays links to the latest Perforce documentation.