Bazaar Tips
There are a few adjustments in switching from a svn workflow to a bzr workflow. This page is meant to catalog some of those gotcha's and help all of us transition.
Nipy's current workflow
Most of us are using a distributed workflow with a shared mainline. There's some discussion on the different workflows here: http://bazaar-vcs.org/Workflows
And the User Guide has more details: http://doc.bazaar-vcs.org/latest/en/user-guide/index.html#distributed-development
Pushing code to launchpad
When you want to push your changes you must specify the shared mainline to push to. The remember flag will make bzr store this location so later you only need $ bzr push.
Substitute your user-name
$ bzr push bzr+ssh://cburns@bazaar.launchpad.net/~nipy-developers/nipy/trunk --remember
Push Error: Permission Denied (publickey)
If you get this error when you try to push your changes you need to upload your ssh key to Launchpad. There's some documentation here: http://bazaar-vcs.org/Bzr_and_SSH
Basically you create your public key with ssh-keygen, then login to your launchpad site, follow the "Update SSH keys" link in the Actions menu and upload your key.
What changes am I about to submit?
You've been making changes over several days and want to see what you've done before merging with the mainline.
cburns@nipy 12:44:46 $ bzr diff -r submit: Using parent branch http://bazaar.launchpad.net/%7Enipy-developers/nipy/trunk/
What was my last commit?
This will print out the log for the last commit. A meaningful commit message helps here.
cburns@nipy 12:44:53 $ bzr log -r last:
Diff between revisions
Diff between two revision numbers.
cburns@formats 19:53:18 $ bzr diff -r1516..1538 analyze.py
Pipe it into colordiff for colored output.
cburns@formats 19:53:18 $ bzr diff -r1516..1538 analyze.py | colordiff
Create a temporary branch to share with others
Launchpad allows you to create temporary branches, called "junk" branches in your personal launchpad space. This is useful for collaborating with others semi-privately while you test out an idea.
Push:
bzr push bzr+ssh://<USER>@bazaar.launchpad.net/~<USER>/+junk/<BRANCHNAME>
Pull (branch or merge):
bzr branch http://bazaar.launchpad.net/~<USER>/+junk/<BRANCHNAME>
