Jeb Wilkins

Coding and climbing in Cumbria.

Updates on the Bazaar TMBundle

I’ve not had much time for this over the last week or so but yesterday I finally got round to adding Push and Pull support. Push pops up a dialog asking for the destination branch, including the parent as the default, then pushes committed changes to that branch. This proved quite straight forward - pushing a branch is just

from bzrlib import branch local = branch.Branch.open('.') remote = branch.Branch.open('http://jdwilkins.co.uk/bzr/myremotebranch') local.push(remote)

All the UI stuff, eg Authentication and Progress Dialogs, is already handled by CocoaUI and CocoaProgressBar which I wrote for the branch stuff.

Pull was almost the same and nearly as simple - pop up CocoaDialog to ask where to pull from then;

from bzrlib import branch local = branch.Branch.open('.') remote = branch.Branch.open('http://jdwilkins.co.uk/bzr/myremotebranch') local.pull(remote)

This doesn’t update our workingtree though so we also need

from bzrlib import workingtree wt = workingtree.WorkingTree.open('.') wt.update()

This doesn’t handle conflicts at all so if theres a conflict its just left in the working tree. Hopefully I’ll extend this with some option to resolve with FileMerge or similar - I’ve not really thought too much about how to handle this yet.