36 lines
1.4 KiB
Plaintext
36 lines
1.4 KiB
Plaintext
# `hg config` => to show the finalized config
|
|
|
|
[extensions]
|
|
# Mercurial Queues (MQ) extension adds patch-stack support to mercurial.
|
|
# MQ is shipped in mercurial, but not enabled by default.
|
|
# it's a port of some git extension, idk which.
|
|
mq =
|
|
|
|
[diff]
|
|
# showfunc = True
|
|
# `diff.git = True`: render diffs with `diff --git` instead of `diff -r`
|
|
git = True
|
|
# `diff.unified = N`: show N lines of context (else, use default as per `diff`)
|
|
# unified = 10
|
|
|
|
[alias]
|
|
noop = !$HG > /dev/null
|
|
q = qseries -s -v
|
|
#
|
|
# `hg qpath`: print the path to the current queue
|
|
qpath = !$HG noop ; echo ".hg/patches-$($HG qqueue --active)" | sed 's:hg/patches-patches:hg/patches:'
|
|
#
|
|
# `hg qcat PATCH_NAME`: view the diff of a mq patch in the current queue.
|
|
qcat = !$HG noop ; cat $($HG qpath)/$1
|
|
#
|
|
# `hg qdup NEW_QUEUE_NAME`: copy all patches in the current queue into a new queue
|
|
qdup = !$HG qpop -a ; cp -R $($HG qpath) .hg/patches-$1 ; echo $1 >> .hg/patches.queues ; $HG qqueue $1
|
|
qstat = qdiff --stat
|
|
sblame = blame -undq
|
|
#
|
|
# these aliases are BROKEN:
|
|
# `hg qmigrate OTHER_QUEUE_NAME`: copy currently-applied patches onto another queue
|
|
# qmigrate = !$HG export -o '/tmp/qmigrate-$1' ; $HG qpop -a ; $HG qqueue $1 ; $HG import '/tmp/qmigrate-$1'
|
|
# `hg qcref`: like `git add -p`; select which changes should be in this patch, interactively
|
|
# qcref = !$HG qrefresh --exclude . && $HG qrefresh --config ui.interface.chunkselector=curses --interactive
|