Wish list for tools implementing graph log

3 views
Skip to first unread message

John Peberdy

unread,
Mar 20, 2012, 12:40:52 AM3/20/12
to mercuri...@selenic.com
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
- glog with --follow
- log/glog with --follow and --removed at the same time
- glog on a directory
- Low: glog with --limit such that it's possible to batch queries as
the user scrolls and still connect up the graph correctly


Probably I will implement this in MercurialEclipse but I thought I
would share my requirements as well.
_______________________________________________
Mercurial-devel mailing list
Mercuri...@selenic.com
http://selenic.com/mailman/listinfo/mercurial-devel

Matt Mackall

unread,
Mar 21, 2012, 6:30:08 PM3/21/12
to John Peberdy, mercuri...@selenic.com
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.

--
Mathematics is the supreme nostalgia of our time.

Jason Harris

unread,
Mar 22, 2012, 5:29:59 AM3/22/12
to Matt Mackall, John Peberdy, mercurial-devel Devel

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

Reply all
Reply to author
Forward
0 new messages