Command line 分支图

Command line 分支图,command-line,mercurial,branch,Command Line,Mercurial,Branch,使用hg,如何在命令行中查看分支图?近似 git log --pretty=oneline --graph 对于Mercurial 2.3及以上版本,请使用 hg log -G 对于较旧的Mercurial,您需要首先安装将启用上述命令的。graphlog扩展还添加了一个别名 hg glog 在Mercurial的所有版本中。您可以在hg中创建自定义模板和别名。例如,在.hgrc中创建别名,如下所示: [alias] lg = log --template "{label('custom.

使用hg,如何在命令行中查看分支图?近似

git log --pretty=oneline --graph

对于
Mercurial 2.3
及以上版本,请使用

hg log -G
对于较旧的Mercurial,您需要首先安装将启用上述命令的。graphlog扩展还添加了一个别名

hg glog

在Mercurial的所有版本中。

您可以在hg中创建自定义模板和别名。例如,在
.hgrc
中创建别名,如下所示:

[alias]
lg = log --template "{label('custom.rev', rev)}\t{label('custom.phase',phase)}\t{label('custom.tag',tags)}\t{desc|firstline} {label('custom.age', date|age)} {label('custom.user', author|user)}\n"

[color]
custom.rev = yellow
custom.phase = bold
custom.user = cyan
custom.age = bold
custom.tag = bold yellow
并用

hglg-G

输出将如下所示


Jordi在他的

中有一些很棒的别名,然后你只需键入,
hg glog
就可以得到类似的输出。你知道如何让它看起来像一个图形吗?它始终显示当前分支的单个时间线。我试着按照Jordis博客上的说明去做,但事实并非如此working@danfromisrael如果有兴趣,请看我的。hgrc在这里不确定我是否理解您的问题。这是Kallithea repo的一个图表:My
~/.hgrc
alias has
lg=log——模板“{label('custom.rev',rev)}\t{label('custom.node',node | short)}{label('custom.phase',phase)}\t{label('custom age.age',date age | age)}\t{desc firstline}{label('custom user.user',author{user',user)}{label('custom branch branch branch branch label('custom branch phase',branch tag),bra('custom.book',bookmarks)}\n“-G
我还有
[实验]图形shorten=true