views:

230

answers:

2

So, I'm just getting started with Bazaar. I am using Bazaar explorer for Windows as the GUI.

I can see how to send my changes via email, but I don't know what to do with the change file once I have it. Where do I put the change file, how do I merge the changes into the Trunk?

If I select merge, and then the folder containing the change file I get an error message that says the folder I've selected is not a branch. Pulling changes works the same way. If I place the change file in with the branch, that doesn't do anything. I'm sure it's something simple.

Thanks

Clarification:

I am not talking about compressing the whole project, emailing the compressed file, unpacking and merging. I'm talking about the export funciton mentioned here:

http://doc.bazaar.canonical.com/explorer/en/visual-tour-windows.html#export

Maybe I'm misunderstanding the purpose of the export function.

Right now I'm leaning towards setting up a VPN for anyone on the project so we can work more directly.

+1  A: 

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.)

VonC
+1  A: 

Even if you can't get the e-mail work flow going, I don't think you need a VPN. It sounds like you can set up an SFTP server, give each user write access to their own repository, and give them read access to everybody else's repositories. Then you can push or commit to your own branches and pull, update, or merge from everyone else's branches.

If it's not obvious how to set that up, I'd recommend you set up an account on Launchpad to play around with branches and merging. It will probably be easier to set up your own server after you and some of your team mates have gotten a little demo project working on Launchpad.

In case it's helpful, here's a summary of my Bazaar workflow on an open-source project. It covers setting up branches, merging changes, and creating merge proposals.

Don Kirkby