我在命令行中使用mercurial,我想知道git lol
和git lola
是否等价?
它们是:
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all --date=local
我试图用hg日志找到一些信息,但没有成功。。。
编辑:大概是这样的:
hg log -G -T "{node|short} - ({branch}) {desc|strip|firstline}"
简短回答
是的,有可能,只需阅读hg help log
+hg help templating
更长的答案
我太懒了,不愿意阅读https://git-scm.com/docs/git-log,因此:如果你以可读的形式描述git log
的每个使用选项,我会发现hg等价的快速而简单(对于存在于hg实体中的引用,在--decorate
中使用的f.e纯粹是Git的玩具(
编辑:
我建议:
-
模板的略微改进版本(您可以选择任何需要的日期格式,而不是isodate(
-T "{node|short} {separate(' ',bookmarks,tags)} - ({branch}) {desc|strip|firstline} {date|localdate|isodate}"
-
在
[templates]
部分中定义模板(为了简化使用hg log -T lol
(,smth。像
[templates]
lol = "{node|short} {separate(' ',bookmarks,tags)} - ({branch}) {desc|strip|firstline} {date|localdate|isodate}"
可能会在日志字符串中为重音标签、书签、分支添加颜色
- 可能添加
lol
(lola
(作为hg别名
[alias]
lol = log -G -T lol