.hgrc/hooks automatic hook directory
Ludovic Chabant
ludovic at chabant.com
Sat Jan 5 18:52:33 UTC 2019
> Did anything changed in hg policy to add non-interactive key/value
> modification for config from command line?
> There seems to be a few plugins with this ability that can be merged.
>
> https://www.mercurial-scm.org/wiki/UsingExtensions#Configuration_management
Nothing has changed AFAICT. I was looking into this recently and tracked down the mercurial-devel discussions on the topic where the conclusion was that "we don't want to get into this rabbit hole because git-config does it and it has become a monster"... with the evidence being the size of git-config's help page... behold: https://git-scm.com/docs/git-config
So I guess at this point nobody wants to go down that path knowing that it will most likely be a huge time sink of code maintenance and feature bloat. Plus, there's a fair amount of people who think that .hgrc is meant to be written by a human.
Going back to the OP, if you truly have a simple checked-out dotfiles repo, then technically you can hard-code the hooks to point to `<dotfiles_repo>/hghooks/blah.sh` in your hgrc, and it should all work fine, no?
(I personally have a slightly more complicated setup where there's an install script in my dotfiles repo because I need to handle multiple platforms, custom hg extensions, secrets, etc.)
--
l u d o .
. 8 0 17 80
More information about the Mercurial
mailing list