41 lines
1.4 KiB
Nix
41 lines
1.4 KiB
Nix
{ ... }:
|
|
{
|
|
sane.programs.mercurial = {
|
|
suggestedPrograms = [
|
|
"less" #< TODO: this might be a missing dependency on the nix side of things?
|
|
];
|
|
sandbox.net = "clearnet";
|
|
sandbox.whitelistPwd = true;
|
|
sandbox.whitelistSsh = true;
|
|
sandbox.extraHomePaths = [
|
|
# even with `whitelistPwd`, hg has to crawl *up* the path -- which isn't necessarily in the sandbox -- to locate the repo root.
|
|
"dev"
|
|
"ref"
|
|
];
|
|
fs.".config/hg/hgrc".symlink.text = ''
|
|
[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]
|
|
# TODO: how much of this is default?
|
|
showfunc = True
|
|
git = True
|
|
unified = 10
|
|
|
|
[alias]
|
|
q = qseries -s -v
|
|
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 qdup NEW_QUEUE_NAME`: copy all patches in the current queue into a new queue
|
|
# current queue must not be named "patches"
|
|
# qdup = !$HG qq --active > /tmp/hg.active ; cp .hg/patches-$(cat /tmp/hg.active) .hg/patches-$1 ; echo $1 >> .hg/patches.queues
|
|
'';
|
|
};
|
|
}
|