Maintaning local changes
Neil Martinsen-Burrell
nmb at wartburg.edu
Wed Aug 26 18:35:07 BST 2009
On 2009-08-26 10:57 , Ivan Sagalaev wrote:
> 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?
There is no automated way to do this. The conceptual problem as I
understand it is that you want to label the changes in a working copy as
being either locally important or globally relevant. Bazaar (and as far
as I know, not other VCS) doesn't track any additional meta-information
about a given change. As a result, you need to keep this information in
your head and when you merge from upstream and then revert, you have to
manually keep track of what changes should *not* be reverted, namely
those which are locally important.
Note that this problem is very, very common for version control. Here,
from the Subversion FAQ is one way of dealing with it in general:
http://subversion.tigris.org/faq.html#ignore-commit
-Neil
More information about the bazaar
mailing list