workflow/merge question

Alexander Belchenko bialix at ukr.net
Fri Apr 4 20:53:45 BST 2008


Sebastian Kuzminsky пишет:
> Hi folks, I've been a happy bazaar user for many months.  I love the 
> highly usable command-line interface, but what really sold me on bzr 
> (over git and hg) is the flexible architecture of repositories, 
> branches, and working trees.
> 
> .... But I've got a problem.  It may be I dont understand how to use 
> merge, or maybe my workflow is wrong for bzr.
> 
> I'm working on a multi-developer open-source project where the main 
> shared revision control system is CVS (boo, hiss).
> 
> I checked out the central CVS tree and committed the working tree to a 
> bzr branch called "upstream" in a shared (but private) repo here 
> locally.  Periodically I'll do something like this to keep my bzr 
> "upstream" branch in sync with the main CVS repo:
> 
>     cvs update
>     bzr add ...
>     bzr rm ...
>     bzr commit
> 
> 
> I branched my "upstream" bzr branch to "local", and I'm doing all my 
> development there.  I periodically "bzr merge --pull" from "upstream" to 
> "local" to keep my development tree in sync with the rest of the 
> developers' CVS tree.
> 
> When I've got something ready to share with the other developers, I 
> merge it (anything from a single commit to several commits) from "local" 
> to "upstream", "bzr commit" in my upstream, and then "cvs commit" to 
> send it to the main CVS repo for the project.
> 
> The commits i merge from local to my upstream branch are not always the 
> the "top of tree" in local, and they're not always contiguous with the 
> other commits  i've merged, or even sequential.  For example, I might 
> have 50 revs in "local"; one day I merge revs 10 and 20-25 to "upstream" 
> and send that on, and the next day I merge revs 5, 15, and 35 and send 
> those on as another CVS commit.
> 
> 
> Now, I bet all you bzr gurus know how this gets problematic for me.  I 
> believe bzr (1.3.0) doesnt handle cherry-picked commits, and then when 
> merging back and forth it gets confused and I get all these merge 
> conflicts and stuff...  :-(
> 
> Is there something I can do to make my life easier?  Change how I merge, 
> change my workflow, anything?

It seems like you need to create more branches instead of working all the time only in local.
For every separate feature that you're planned to merge back to upstream you could
start new branch.

Also you can look at bzr-loom plugin. It's very interesting, but it supposed that your patches
built one on top of other.



More information about the bazaar mailing list