有什么方法可以改变图形在TortoiseHg中的绘制方式吗? [英] Is there any way to change how graphs are drawn in TortoiseHg?

查看:115
本文介绍了有什么方法可以改变图形在TortoiseHg中的绘制方式吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

习惯了ClearCase绘制图形的方式,我发现Mercurial和TortoiseHg的乍一看令人困惑。

/ a-successful-git-branching-model /rel =nofollow noreferrer>这是我希望如何表示的代码:

分行静态头寸。例如。维护分支的左/右总是,最好是一条直线,而不是现在的意大利面弯曲分支,现在是它(见下面的链接)。

以及它如何绘制图表。这更符合我想看到我自己的情况。

问题是任何分支提交都会创建一个匿名分支(与命名分支相反,这是一个稍微不同的概念),并且默认图形视图不能提交在没有好的ID的静态列中。因此,实现者放弃了,我们有了当前图。



现在,我认为您给出的第一个视图非常棒,应该可以使用一些启发式根据(developer1-a,developer2-a,developer2-b等)为匿名分支分配id。那很酷。 :)

捐款时间!

更新

我想看到的是:


  • 提交按提交时间垂直排序,而不是修订版整数ID 。
  • 提交水平排序,按命名分支分组,每个分支内的每个提交者分组。 (并且每个提交者提交都应该接近,以防提交者分叉并合并他自己的数据。)


    这意味着算法具有在填充视图并将提交点放入右列/行之前查看所有提交(要查看的内容)。



    所有提交应该足够了,而且每个都可以在O(n)时间完成,这是O(n)的一切:


    • 全部走收集数据(收集分支/提交者)(O(n))
    • 将分支/提交排序为合适的列顺序
    • 按提交时间排序提交(O(n log n)或更好的O(n),并且基数在自epoch以秒计算)

    • 散步根据分组提交和绘制圆点和祖先线



    也许我们需要在提交之间路由时灵活(er),但仍有待观察。尤其是,我们可以在提交点之间使用垂直空间来连接垂直相距很远的合并(即时间),而不是像当前算法那样使用整列。


    Being used to how ClearCase draw graphs I find Mercurial's and TortoiseHg's way confusing at first glance.

    This is how I'd like it to be represented: With static positions for branches. E.g. Maintenance branch to the left/right always and preferably in a straight line and not the current spaghetti curved branch it is now (see below link).

    This is how it looks using the TortoiseHg Explorer. The graph is from a test repository. :-)

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

    [edit]

    Check out MacHg and how it draws the graphs. This is more in line of what I'd like to see myself.

    解决方案

    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

    这篇关于有什么方法可以改变图形在TortoiseHg中的绘制方式吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆