Explorer & QBzr Log

Gary van der Merwe garyvdm at gmail.com
Thu Apr 22 09:56:25 BST 2010


On Thu, Apr 22, 2010 at 7:19 AM, Eric Berry <elberry at gmail.com> wrote:
> Hi John,
>    Thanks for the reply.
>
> How does qlog get that information then?

qlog gets the info by calling bzrlib api's. Most of the logic is in
qbzr/lib/libgraphprovider.py
http://bazaar.launchpad.net/~qbzr-dev/qbzr/trunk2a/annotate/head%3A/lib/loggraphprovider.py

If you just want re-implement qlog in swing, I would recommend reusing
that. In the future, I hope to move that file into bzrlib, but I first
need to write comprehensive tests for it. In the mean time, you can
just copy it.

Here is a very high level overview of the steps:
1. Load the revision graph: line 549
2. merge_sort - This is done by bzrlib. It sorts the revisions, and
provides the revision numbers, and some other info: line 574
3. Split the revisions into branch lines, aka merge lines: line 639 	

4. Layout graph. (compute_graph_lines) Line 999. This happens every
time you collapse or expand merges, or filter revisions, so it uses
lots of info cache during load, so that it runs very quickly.

Sorry I can't give you more info. I'm a bit busy at work. I hope this
will get you started.

Gary



More information about the bazaar mailing list