Jeb Wilkins

Coding and climbing in Cumbria.

TextMate - Bazaar Log Support

The Bazaar.tmbundle now has very limited support for showing the log of a branch. Currently limitations mean it only shows the log for the entire branch, doesn’t list the files changed in a revision and isn’t formatted very nicely - on the plus side it works, was quite simple to do and I’ve got solutions for two of the tree issues, I’ve just not had chance to do anything about them yet. Hopefully I’ll sort this properly on sunday.

I’ve implemented Log support the same as the various other vcs bundles and just show the log in an HTML output view which meant making bzr output HTML. Much like the UI stuff, I just needed to supply my own LogFormatter class which generated HTML tables instead of nicely spaced plain text, I did this by copying the LongLogFormatter class and hacking it around a bit - not ideal, I’ll possible change this to just inherit from it instead. Make bzr use the log formatter and generate the log is

` import sys from bzrlib import branch from bzrlib import log from bzrlib.symbol_versioning import * # needed to handle deprecated function markers

b = branch.Branch.open(‘.’) lf = TmHtmlLogFormatter(to_file = sys.stdout) # use my custom log formatter log.show_log(b, lf) `

As ever this can be retrieved using bzr from

http://www.jdwilkins.co.uk/bzr/Bazaar.tmbundle