Maintaning local changes

Alexander Belchenko bialix at ukr.net
Fri Aug 28 13:05:51 BST 2009


Ivan Sagalaev пишет:
> Hello!
> 
> I'm a recent user of Bazaar and one of the things I like is it's support 
> for a variety of workflow patterns. However here's one that I don't know 
> how to do with bzr.
> 
> I have an upstream branch with which I synchronize periodically and it's 
> used as an upstream branch by other developers. Sometimes it happens 
> that I need to do some changes to code that make sense only to my local 
> environment (temporary hacks, local config changes). I'd like to have 
> these changes in all my local branches but I don't want them to be 
> pushed upstream.
> 
> The only (inconvenient) solution that I can think of is to have one 
> local branch dedicated to testing that will contain those environment 
> modifications. Then I do development in other branches and every time I 
> need to test my work I merge it to this test branch, test it and revert 
> it back to "upstream state + environment mods" every time.
> 
> Is there a better solution?

After thinking more on the details of your question it seems like you 
need to loomify every your working branch and that's could be blocker 
for you.

Basically with loom every your working branch will consist following 
minimal stack of threads:

    your private changes   <--- testing working tree
   /
  your working fixes
/
upstream mirror


But as you said you have multiple working branches with your fixes so 
you actually want something like that:


          upstream
          /       \
work branch#1    work branch#2
  |                         |
  |  --- private changes--  |
  | /                     \ |
  +                         +
  |                         |
  V                         V
testing branch#1       testing branch#2


Recently was released first version of bzr-builder plugin and this 
plugin can execute scenarious for combine several branches into one. 
Maybe this plugin will help you and serve as custom script to apply your 
private changes to get testing branch. But you have to be careful and 
don't commit your changes in testing branches while you testing and 
hunting bugs, but instead propagate your uncommitted fixes back to work 
branch and then re-build testing branches. Sounds very similar to what 
pipeline doing.

https://launchpad.net/bzr-builder




More information about the bazaar mailing list