As explained in bug #86420, there are multiple ways a location can be not a branch, such as:
- no
.bzr
directory
.bzr
directory present, but no .bzr/branch
directory
It would be helpful if Bazaar explained exactly why it does not consider a location to be a branch, because that both explains to the user what's going on (and where to look next to diagnose further), and also because it makes suggesting a likely remedy easier.
In particular, it would help bug #86402 by improving user feedback and making it easy for the system to suggest an appropriate remedy to the user.
For the case where there is a .bzr
directory, but no branch in it, perhaps the error text ought to suggest the user try "bzr info
" to understand what it is that directory contains instead.
You do have an example of merging from an emailed change file here. (command-line version)
# USER 1
bzr init-repository project
bzr init project/user2
bzr branch project/user2 project/user1
# USER 2
bzr init-repository project
bzr init project/user1
bzr branch project/user1 project/user2
# USER 1
cd project/user1
<do some work>
bzr commit -m "feature foo"
bzr send -o ../foo.patch # email the feature foo as it compares to the 'user2' branch
# USER 2
cd project/user2
bzr commit -m "feature bar"
bzr send -o ../bar.patch # email to USER 1
cd ../user1
bzr pull ../foo.patch
cd ../user2
bzr merge ../user1
bzr commit -m "Merge foo"
# USER 1
cd project/user2
bzr pull ../bar.patch
cd ../user1
bzr merge ../user2
...
Basically, the idea is that you have 1 branch which you explicitly label as the other user's work. When they send you a new merge directive, you go into your copy of their branch, and use "bzr pull
". At this point your local branch should be an exact mirror of their remote branch. You then do "bzr merge
" as appropriate into your own working branch.
The reason I start with "bzr branch user1 user2
" is just to get the default target for "bzr send
" set. You can just do "bzr send -o XXX ../userX
" the first time, I believe it is remembered from there on out.
Also, you don't have to use "-o XXX
", if you just want to start up the email program with the patch attached. (I think you need to set --mail-to
in that case.)