簡體   English   中英

git lol 和 git lola 與 mercurial 是否等效?

[英]Is there an equivalence to git lol and git lola with 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 log 找到一些信息,但沒有任何成功......

編輯:它會是這樣的:

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 實體中的引用,fe,在--decorate中使用純粹是 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-aliases
[alias]
    
lol = log -G -T lol

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM