programs: mercurial: move to own directory
This commit is contained in:
@@ -125,7 +125,7 @@
|
||||
./megapixels.nix
|
||||
./megapixels-next.nix
|
||||
./mepo.nix
|
||||
./mercurial.nix
|
||||
./mercurial
|
||||
./mimeo
|
||||
./mimetype.nix
|
||||
./mmcli.nix
|
||||
|
@@ -1,49 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
sane.programs.mercurial = {
|
||||
packageUnwrapped = pkgs.mercurialFull;
|
||||
sandbox.wrapperType = "inplace"; # etc/mercurial/hgrc refers to hg python-path (to define an extension)
|
||||
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 = ''
|
||||
# `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]
|
||||
q = qseries -s -v
|
||||
#
|
||||
# `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 ; $HG qpop -a ; cp -R .hg/patches-$(cat /tmp/hg.active) .hg/patches-$1 ; echo $1 >> .hg/patches.queues ; $HG qq $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
|
||||
'';
|
||||
};
|
||||
}
|
19
hosts/common/programs/mercurial/default.nix
Normal file
19
hosts/common/programs/mercurial/default.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
sane.programs.mercurial = {
|
||||
packageUnwrapped = pkgs.mercurialFull;
|
||||
sandbox.wrapperType = "inplace"; # etc/mercurial/hgrc refers to hg python-path (to define an extension)
|
||||
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.target = ./hgrc;
|
||||
};
|
||||
}
|
29
hosts/common/programs/mercurial/hgrc
Normal file
29
hosts/common/programs/mercurial/hgrc
Normal file
@@ -0,0 +1,29 @@
|
||||
# `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]
|
||||
q = qseries -s -v
|
||||
#
|
||||
# `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 ; $HG qpop -a ; cp -R .hg/patches-$(cat /tmp/hg.active) .hg/patches-$1 ; echo $1 >> .hg/patches.queues ; $HG qq $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
|
Reference in New Issue
Block a user