Search code examples
version-controlbazaar

Is it possible to create a sub-branch in Bazaar?


I need to make a small set of changes to my project, but I want to keep them alongside the main tree - so that I can revert to earlier state after that, and continue working (I want to make a small crippled build of my project). But I do not want to make a full branch of my project.

For example:

  ...
   |
  rev 100
   |     \ 
rev 103   rev 101
   |        \
  ...       rev 102

And I want to be able to revert to any of these revisions. Is it possible in Bazaar?


Solution

  • You can use bzr-colo plugin for this:

    cd your-branch
    # prepare colo workspace
    bzr colo-ify
    # create a subbranch
    bzr switch -b subbbranch
    # hack-hack-hack-commit-commit
    #now revert back to your main state
    bzr switch trunk
    # now you want to come back to subbranch
    bzr switch subbranch
    

    See bzr help colo for user manual of bzr-colo.