views:

24

answers:

1

I am having some difficulty figuring out which Bazaar commands to use...

Suppose I have a local branch named "test" in a folder of the same name:

  • When I initially get the branch, I type:
cd test
bzr pull lp:project_name
  • To commit local changes, I type:
bzr commit -m "message"

I have no trouble with those commands.
Here is where I get confused:

  • How do I push changes to Launchpad? I'm guessing bzr push but doesn't that overwrite other contributors' changes?
  • How do I update my local branch? I'm guessing bzr pull, but doesn't that overwrite my changes?

What are the proper commands in each case?

+1  A: 

bzr push won't overwrite other changes. It already someone else has pushed it changes it will stop and tell you that you need to merge first. So basically you can only push when you have included the changes from the push-location.

Similar with bzr pull it takes from the location. However you already local work committed, it will stop and ask you to use bzr merge.

Gamlor
So merge is the command to use in both cases?
George Edison
Yes! merge is always used when two branches have diverted.
Gamlor
Okay, thanks for that!
George Edison