view dot_hgrc @ 1044:fb4670b7526a

feat: replicate push-line function from zsh source: https://github.com/fish-shell/fish-shell/issues/7800#issuecomment-792915764
author Zeger Van de Vannet <zeger@vandevan.net>
date Thu, 02 May 2024 08:48:33 +0200
parents bdd538139b08
children ffd8a15ceee9
line wrap: on
line source

%include ~/.config/mercurial/local.hgrc

[ui]
# 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 = yes

# Dump merge conflict markers in files in 3-way format
merge = internal:merge3

# Global ignore file
ignore = ~/.hgignore

# Show copies in status
statuscopies = yes

# Disable rollback
rollback = no

# Use curses interface for rebase, histedit
interface = curses

# Use helix as editor
editor = hx

[merge-tools]
meld.disabled = yes
vimdiff.disabled = yes

[extensions]
histedit =
rebase =
topic =
evolve =
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 = random
evolution = all
auto-publish = warn

[phases]
publish = false

[alias]
st = status -mard
stat = status -mard
blame = annotate -cufld

[rhg]
on-unsupported = fallback
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.
  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()}

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