Skip to content

Instantly share code, notes, and snippets.

@Psycojoker
Created March 8, 2019 15:50
Show Gist options
  • Select an option

  • Save Psycojoker/77f1c26d65e95cebcfacebae42d7780c to your computer and use it in GitHub Desktop.

Select an option

Save Psycojoker/77f1c26d65e95cebcfacebae42d7780c to your computer and use it in GitHub Desktop.

Revisions

  1. Psycojoker revised this gist Mar 8, 2019. No changes.
  2. Psycojoker created this gist Mar 8, 2019.
    52 changes: 52 additions & 0 deletions .hgrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,52 @@
    [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