我在命令行中使用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}"
发布于 2020-08-28 15:12:41
简短回答
是的,有可能,只需阅读hg help log + hg help templating
较长答案
我懒得阅读https://git-scm.com/docs/git-log中的文本墙,因此:如果您以可读的形式描述git log的每一个使用选项,我会发现hg等价的快速和简单(对于hg实体中存在的引用,--decorate中使用的f.e纯粹是Git的玩具)
编辑:
我建议:
-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 lolhttps://stackoverflow.com/questions/63635575
复制相似问题