Wish list for tools implementing graph log
Jason Harris
jason at jasonfharris.com
Thu Mar 22 09:29:59 UTC 2012
On Mar 21, 2012, at 11:30 PM, Matt Mackall wrote:
> On Tue, 2012-03-20 at 00:40 -0400, John Peberdy wrote:
>> I'd like to improve the graph log in MercurialEclipse. Currently it
>> invokes the glog extension and parses output. This doesn't work well -
>> glog output changed around 1.9 IIRC which broke the parsing in some
>> situations and more importantly --follow is not supported.
>>
>> Ideally MercurialEclipse file history would show graph log for files
>> with the union of the revisions provided by --follow and --removed.
>>
>>
>> Here is my glog wishlist
>> - glog output in machine friendly format
>
> Not likely.
>
>> - glog with --follow
>
> Already exists: log -G --follow.
>
>> - log/glog with --follow and --removed at the same time
>> - glog on a directory
>
> Already (almost) works: hg log -G mercurial/**
>
>> - Low: glog with --limit such that it's possible to batch queries as
>> the user scrolls and still connect up the graph correctly
>
> Works, but you'll probably lose if you try to stitch the results
> together.
>
>> Probably I will implement this in MercurialEclipse but I thought I
>> would share my requirements as well.
>
> As far as I know, every other system has implemented its own graph
> calculator.
Well I can say that I had to roll my own for MacHg. It was the last point of
John's (continuity) which forced me to roll my own, ie so that MacHg could generate
just a portion of the graph history, but then the user could scroll and you
would have continuity. It's a semi-tricky problem and my solution does a good job in
MacHg but it is not fully optimal. (Ie I can note cycles in what I lay stuff out which
could be done better by inspection.)
Right now the MacHg algorithm is a somewhat greedy allocation algorithm. You
can view the objective-C source code for this algorithm here:
https://bitbucket.org/jfh/machg/src/tip/Classes/LogEntryModel/LogGraph.m
(If anyone knows a better algorithm and / or something more appropriate that is
really fast it would be nice to know. I briefly investigated some layout
algorithms from Graph theory before settling on what I did.)
Cheers,
Jas
More information about the Mercurial-devel
mailing list