Skip to content

Instantly share code, notes, and snippets.

@Psycojoker
Created March 8, 2019 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Psycojoker/77f1c26d65e95cebcfacebae42d7780c to your computer and use it in GitHub Desktop.
Save Psycojoker/77f1c26d65e95cebcfacebae42d7780c to your computer and use it in GitHub Desktop.
Custom log command for mercurial
[revsetalias]
l = (parents(not public()) or not public() or . or head()) and (not obsolete()^) and not closed()
[templates]
l =\
{pad(label("commit.rev", rev), 5, " ", True)} \
{label("commit.hash", node|short)} \
{pad(label("changeset.{phase}", phase), 8)} \
{label("commit.date", pad(date|age, 15))}\
{label("commit.branch.{ifeq(branch, "default", "default", "other")}", pad(branch, 10))}\
{pad(label("commit.user", author|user), 12)} \
{bookmarks % "{ifeq(bookmark, currentbookmark, label('log.activebookmark', bookmark), label('log.bookmark', bookmark), "")} "} \
{if(tags,"{label("log.tag", tags)} ", "")}\
{label(ifcontains(rev, revset('parents()'), 'desc.here'),desc|firstline)}
[extensions]
color =
graphlog =
[color]
mode=ansi
#Custom colours
color.orange = 202
color.lightyellow = 191
color.darkorange = 220
color.brightyellow = 226
#Colours for each label
log.branch = cyan
# log.summary = lightyellow
# log.description = brightyellow
log.bookmark = green
log.tag = red_background
log.activebookmark = green bold underline
log.parent = white
log.topic = blue
changeset.public = green
changeset.secret = blue
changeset.draft = yellow
desc.here = bold blue_background
commit.branch.default = cyan
commit.branch.other = red
commit.user = magenta
commit.hash = blue
commit.rev = yellow
[alias]
l = log --graph --rev=wip --template=l -l 25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment