# HG changeset patch # User Zeger Van de Vannet # Date 1711525812 -3600 # Node ID bdd538139b086fff57e776a36855ff96b72e1813 # Parent ccf4b28f04f9b7c62513da2785c881f7baf36c33 feat: enable some hgrc options and add templates diff -r ccf4b28f04f9 -r bdd538139b08 dot_hgrc --- a/dot_hgrc Wed Mar 27 08:18:19 2024 +0100 +++ b/dot_hgrc Wed Mar 27 08:50:12 2024 +0100 @@ -4,41 +4,63 @@ # We recommend enabling tweakdefaults to get slight improvements to # the UI over time. Make sure to set HGPLAIN in the environment when # writing scripts! -tweakdefaults = True +tweakdefaults = yes + +# Dump merge conflict markers in files in 3-way format +merge = internal:merge3 + +# Global ignore file +ignore = ~/.hgignore -# uncomment to disable color in command output -# (see 'hg help color' for details) -# color = never +# Show copies in status +statuscopies = yes + +# Disable rollback +rollback = no -# uncomment to disable command output pagination -# (see 'hg help pager' for details) -# paginate = never -merge = internal:merge3 +# Use curses interface for rebase, histedit +interface = curses + +# Use helix as editor +editor = hx [merge-tools] meld.disabled = yes vimdiff.disabled = yes [extensions] -# uncomment the lines below to enable some popular extensions -# (see 'hg help extensions' for more info) -# histedit = rebase = topic = evolve = -# confman = -# hggit = absorb = largefiles = +# Store http(s) passwords in a keyring +# Configure schemes via: +# [auth] +# schemename.prefix = https://example.com +# schemename.username = jdoe mercurial_keyring = +[commands] +# Require to pass an explicit revision when pushing +push.require-revs = yes +# Show paths relative to cwd +status.relative = yes +# Determines what level of checking 'hg resolve --mark' will perform +resolve.mark-check = abort +# "noconflict" will allow any update which would not trigger a merge +update.check = noconflict + +[paths] +# Always push current revision unless specified +default:pushrev = . + [experimental] -topic-mode = warn +topic-mode = random evolution = all auto-publish = warn - [phases] publish = false @@ -52,6 +74,12 @@ fallback-executable = /usr/local/bin/hg allowed-extensions = rebase, absorb, evolve, topic +[diff] +git = yes +nodates = no +showfunc = 1 +word-diff = 1 + [committemplate] changeset = {desc}\n\n HG: Enter commit message. Lines beginning with 'HG:' are removed. @@ -70,3 +98,57 @@ HG: Do not touch the line above. HG: Everything below will be removed. {diff()} + +changeset.commit.normal.normal = {desc}\n\n + HG: Enter commit message. Lines beginning with 'HG:' are removed. + HG: {extramsg} + HG: -- + HG: user: {author}\n{ifeq(p2rev, "-1", "", + "HG: branch merge\n") + }HG: branch: '{branch}'\n{if(topic, + "HG: topic: '{topic}'\n") }{subrepos % + "HG: subrepo: {subrepo}\n" }{file_adds % + "HG: added {file}\n" }{file_mods % + "HG: changed {file}\n" }{file_dels % + "HG: removed {file}\n" }{if(files, "", + "HG: no files changed\n")} + HG: ------------------------ >8 ------------------------ + HG: Do not touch the line above. + HG: Everything below will be removed. + {diff()} + +[templatealias] +commitinfo = '{date|shortdate} {pad(label("grep.user", author|person), 20, left=True, truncate=True)} {desc|strip|firstline}' + +[templates] +oneline_stack = '{pad("{label("stack.index", "s{stack_index}")}{label("stack.state.{state}", symbol)}", 5, left=True)} {label("stack.state.{state}", pad(state, 8))} {commitinfo}\n' +oneline = '{label("changeset.{phase}", node|short)} {pad(label("log.branch", fqbn), 25, truncate=True)} {commitinfo}\n' + +[color] +mode=auto + +log.branch=cyan +log.bookmark=green +log.topic=yellow +log.tag=green +log.activebookmark = green bold underline + +changeset.public=green +changeset.secret=blue bold +changeset.draft=red + +desc.here=green_background black +stack.state = red + +[alias] +node = parent --template '{node}' +ls = log --template=oneline --limit=50 --pager=auto +stack = stack --color=always --template=oneline_stack +status = status -mard +st = status -mard +stat = status -mard +incoming = incoming --template=oneline +in = incoming --template=oneline +outgoing = outgoing --template=oneline +out = outgoing --template=oneline +mark = resolve --mark