Is there any way to change how graphs are drawn in TortoiseHg?

人走茶凉 提交于 2019-12-02 20:46:45

The problem is that any forking commit creates an "anonymous" branch (as opposed to a named branch, which is a slightly different concept), and the default graph view can't place commits in static columns without having good ids. Thus, the implementor gave up and we have the current graph.

Now, I think the first view you give is awesome, and it should be possible to use some heuristics to assign ids to anonymous branches depending on (developer1-a, developer2-a, developer2-b, etc). That'd be cool. :)

Contribution time!

Update

What I'd like to see:

  • Commits sorted vertically by commit time, rather than revision integer id.
  • Commits sorted horizontally, grouped by named branch, and per committer inside each branch. (And each committers commits should be near, in case a committer has forked and merged his own data.)

This means an algorithm has to look at all commits (that are to be viewed) before populating the view and placing the commit "dots" in the right column/row.

Three passes over all commits ought to suffice though, and each can be done in O(n) time, which is O(n) for everything:

  • walk all to gather data (gather branches/committers) (O(n))
  • sort branches/commits into suitable column order
  • sort commits by commit time (O(n log n) or better O(n) with radix-sort on seconds since epoch)
  • walk commits and draw dots and ancestor lines according to grouping

Maybe we need to be smart(er) when routing the lines between commits, but that remains to be seen. Especially, we could use vertical space between commit-dots to connect merges that are far apart vertically (i.e. in time), instead of using an entire column like the current algorithm

pyfunc

AT the moment, there seem nothing available to do visualization in the way you want it.

I guess the visualization of TortoiseHg explorer is straight from the graphlog extension.

How ever, there is a graphviz based visualization, though it is similar to graphlog but you can hack it any way to make it more visually better.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!