Files
dotfiles/google/.hgrc
Christian Nieves d56eb258cd hg alias
2025-03-04 19:04:44 +00:00

75 lines
2.4 KiB
Plaintext

%include /google/src/head/depot/google3/experimental/fig_contrib/hgshort/hgshort.hgrc
[ui]
editor = nvim
paginate = never
merge = vimdiff
username = Christian Nieves <cnieves@google.com>
# graphnodetemplate = {label("graphnode.{graphnode}", graphnode)}
[extdiff]
icdiff = icdiff --recursive --line-numbers
cmd.vimdiff = nvim
opts.vimdiff = -d
# opts.vimdiff = -f -d $output -M $local $base $other -c "wincmd J" -c "set modifiable" -c "set write"
# opts.vimdiff = -f '+next' '+execute "DirDiff" fnameescape(argv(0)) fnameescape(argv(1))'
# opts.vimdiff = -c ':call ShowMercurialDiff(argv(0), argv(1))'
[extensions]
# unsupported.tree =
# unsupported.alices =
extdiff =
# color =
beautifygraph =
# [alices]
# findings.extra_args = --proxy
# summarize.extra_args = --proxy
[merge-tools]
vimdiff.executable = nvim
# vimdiff.args = -d $local $other $base
# vimdiff.premerge = keep
vimdiff.args = -d $output -M $local $base $other -c "wincmd J" -c "set modifiable" -c "set write"
[diff-tools]
vimdiff.executable = nvim
vimdiff.args = -d $base $local $output $other +close +close
[committemplate]
changeset = {desc}\n\n
HG: {extramsg}
HG: user: {author}\n{ifeq(p2rev, "-1", "",
"HG: branch merge\n")
}HG: branch '{branch}'\n{if(currentbookmark,
"HG: bookmark '{currentbookmark}'\n") }{subrepos %
"HG: subrepo {subrepo}\n" }
{splitlines(diff()) % 'HG: {line}\n'}
[alias]
dt = icdiff --pager=on
dtex = dt -r exported(.)
dtp4 = dt -r p4base
dtup = dt -r .^
ra = revert --all
whatsout = status -n --change . --template=hgshort_status
what = status -n --change . --template=hgshort_status
whatsoutall = status --rev p4base --no-status --template=hgshort_status
# unbranch = cp --forget --at-rev . $1
unbranch = !$HG uncommit --keep $1 && $HG forget $1 && $HG add $1 && $HG amend $1
g3docpreview = ! $HG status --rev p4base --no-status -I re:.*\.md$ | xargs -I PATH -n 1 echo "https://g3doc.corp.google.com/PATH?cl=$(citctools info | grep Workspace.ID | cut '-d ' -f 3)"
mdiff = ! HG_ROOT=$(hg root) hg _real_multidiff "$@"
# For some reason, aliases that reuse mdiff don't work, so the
# entire thing has to be copied.
mdiffp4 = ! HG_ROOT=$(hg root) hg _real_multidiff --rev p4base "$@"
mdiffup = ! HG_ROOT=$(hg root) hg _real_multidiff --rev .^ "$@"
depotpath = !realpath -m $@ | sed s#`hg root`#//depot#
filelog = !p4 filelog `$HG depotpath $@`
[trainingwheels]
warn-head-paths=False
prevent-push-dirty=false