Maintaning local changes

Alexander Belchenko bialix at ukr.net
Wed Aug 26 18:36:26 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.

Privet Ivan!
Welcome to the list.

> 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?

I think you can use loom plugin[1] for this: convert one your working branch to loom, use mirror of
upstream as base thread and make the another thread above with your private fixes. Then you can
update upstream and auto-merge new upstream revisions with your fixes.

When you need to implement new feature on top of upstream but without you fixes you need to make new
thread above upstream but below your fixes (I hope this possible now, people who know better about
loom will fix me) and switch between threads as needed.

Also you can use shelve/unshelve to hide your private fixes from working tree before commit and
restore them after.

[1] https://launchpad.net/bzr-loom




More information about the bazaar mailing list