How to I set up a vendor branch workflow for Plastic SCM?

336 views Asked by At

I have been thrown into a software development project where we have a PHP application from a vendor with fairly regular code updates. I need to be able to build on top of this code while, at the same time, I need to be able to track the changes in the vendor's code and merge them into our own code releases. I envision it as something like this:

 
 VENDOR    v1.0 --------v1.2-----------v1.3--------v2.0---------v2.1------ETC.
                          |                                     
                          V           V           V                               
        OUR BRANCH       v1.0-------v1.1---------v1.2------ETC.
 

I am starting this from scratch and looking for recommendations on the source control software to use (I am considering Plastic SCM), best practices, workflow setup, and general advice on what works best.

1

There are 1 answers

1
pablo On

Well, your scenario is pretty common (it reminds me some mobile phone manufactures! :P).

You'll need to keep your "vendor" branch in sync and then "merge down" to "our branch" :P when required.

In order to do that:

  • If your "vendor" branch comes from Git or any "fast-export compatible" version control -> you can use fast-import/export with "incremental tags" to make it work: http://codicesoftware.blogspot.com/2011/10/connecting-plastic-scm-to-github.html

  • If your "vendor branch" SCM is not compatible you can use a "poor's man" approach: copy your changes on top of the Plastic workspace pointing to the "vendor" branch and then use the "pending changes view" to look for changed, deleted, added and even moved files.

Steps with Plastic SCM

  • create a repository for your project
  • create a "vendor" branch
  • switch to it
  • copy your "vendor code" on your workspace
  • checkin
  • label it
  • create "your code" branch from the label, keep working on it

In order to update your vendor branch

  • switch to "vendor"
  • copy/paste the code on your workspace (full vendor distro)
  • use "pending changes view" to find changes
  • checkin
  • label

To apply your "vendor code" updates: - merge from the appropriate label into your branch(es)