Wiki Tools

  • Find Page
  • Recent Changes
  • Page History
  • Attachments


Currently our log output (and internal API) has several deficiencies. It seems useful to overhaul our Log internals, to break things up into a nice api, which can easily handle more use cases.


  1. It doesn't give proper output for bzr log filename. (currently all non-mainline revisions are printed for --long format, regardless of whether they modified filename)

  2. It has difficulty generating XML output. You need to generate a closing tag when you are done, but the current LogFormatter api has no way of knowing that.

  3. It doesn't handle bzr log -r revid:non-mainline-revision. (It just falls back to showing all revisions).

  4. It is really slow at handling bzr log filename, because it has to extract full inventories and delta them, rather than extracting the delta information in some other manner. Similarly bzr log --verbose is slower than it should be.

  5. It can only handle 1 file, or the whole tree. Not "bzr log file1 file2" or "bzr log directory". Or possibly fancy regexes like "bzr log *Makefile".

Further Details

I'm currently thinking to refactor the log api into a Log Formatter class which just takes revisions and formats them for display. We mostly have this. And then create a better Log Generator api, which can do a bit better about figuring out what revisions need to be shown, etc.


Use Cases

  1. bzr log Should be able to support multiple output formats. We currently have '--short', '--line', and '--long', but it would be useful to have '--xml'.

  2. bzr log filename should print what revisions have modified the file.


UI Changes

Code Changes

Schema Changes

Data Migration


Unresolved Issues

  1. Should bzr log filename also show revisions which merged the changes to filename. Or only revisions which actually modify it?

Questions and Answers