Is there an equivalence to git lol and git lola with mercurial?

Viewed 511

I'm using mercurial in command line and I would like to know if there is an equivalence to git lol and git lola ?

which are:

lol = log --graph --decorate --pretty=oneline --abbrev-commit

lola = log --graph --decorate --pretty=oneline --abbrev-commit --all --date=local

I tried to find some information with hg log but without any success...

Edit: It would be something like:

hg log -G -T "{node|short} - ({branch}) {desc|strip|firstline}"

1 Answers

Short answer

Yes, it possible, just read hg help log + hg help templating

Longer answer

I'm too lazy to read the wall of text in https://git-scm.com/docs/git-log, thus: if you'll describe in readable form each used option of git log, I'll find hg equivalent fast and easy (for existing in hg entities, references, f.e, used in --decorate are purely Git's toys)

Edit:

I'll suggest:

  • slightly improved version of template (you can select any needed for you format of date instead of isodate)

    -T "{node|short} {separate(' ',bookmarks,tags)} - ({branch}) {desc|strip|firstline} {date|localdate|isodate}"

  • define template in [templates] section (for simplified usage hg log -T lol), smth. like

[templates]

lol = "{node|short} {separate(' ',bookmarks,tags)} - ({branch}) {desc|strip|firstline} {date|localdate|isodate}"

probably add colors for accentuation tags, bookmarks, branch in log-string

  • maybe add lol (lola) as hg-aliases
[alias]
    
lol = log -G -T lol
Related