git lol和git lola与mercurial等价吗

  • 本文关键字:git mercurial lol lola git mercurial
  • 更新时间 :
  • 英文 :


我在命令行中使用mercurial,我想知道git lolgit 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

最新更新