I'm new to Bazaar, coming to it from a background of Subversion and git. I thought I had a working grasp of some basic concepts, but have already hit a stumbling block in my first major commit.
The project is hosted on Launchpad. I created a local branch ("working") with bzr branch
. I made changes, added new files, renamed others. In the interim another person on the team committed and pushed their changes. At this point the commit history looked something like this:
3. Team Member A
2. Me (trivial commit of .bzrignore)
1. Original commit
This morning I bzr commit
my changes locally. The commit number was reported as 3, which I assumed (wrongly) would be reconciled when I sync'd with the server. When I did a bzr pull
I got this message:
Using saved parent location: bzr+ssh://bazaar.launchpad.net/... bzr: ERROR: These branches have diverged. Use the missing command to see how. Use the merge command to reconcile them.
I did bzr merge
. No conflicts were discovered but three files were left as modified in my local branch. I inspected and committed those with a comment, which was reported to me as commit 4. Then I did a bzr push
, which reported no errors.
Now the commit history (bzr log --include-merges
) looks like this:
4. My merge commit
2.1.1 Team Member A
3. My commit this morning
2. My .bzrignore commit
1. Original commit
There's a high desire here to keep the trunk line serialized and avoid these merge bubbles. (Annoyingly, Launchpad doesn't display the 2.1.1 commit, making it look like I overwrote it.) What is the best workflow in this situation to avoid these bubbles? Should I have pulled first? I'm wary of having to merge other people's code into my local uncommitted changes.
In addition, although rebase is commonly used in git, it appears it's not generally approved of in the Bazaar world. If we can avoid using the bzr-rebase plugin, that would be great.