Mercurial options
Craig Ozancin
c.ozancin at gmail.com
Sat Nov 21 19:59:45 UTC 2020
Hi,
I have over the last couple years done a bit of bash scripting about
mercurial. So far I have only come across two annoyances. Neither are
show stoppers.
The first is just a minor issue. hg-evolve always reports new obsolete
changesets. This is true even when the -q / --quiet option is given.
The other is regarding how hg is called.
For example, I create a bash script name test that does some stuff including
calling hg one or more times. I then create the following alias:
[alias]
test = ! ~/bin/test
All works as expected.
Mercurial makes the following available to test:
HG an exported variable with the path to hg
HG_ARGS set to test
I always use $HG in my scripts. HG_ARGS not so much.
The problem is when I call hg with extra options.
hg --hidden test
or
hg --color never test
Test runs without knowing that these options were used. It would be nice
to use these options in the script to give the expected behavior. Is there
alway to identify used hg options?
If not, would it be possible to add an additional exported variable that
lists
the options in a comma separated format:
HG_OPTIONS="--hidden,--color,never"
This could then be parsed by a script to obtain the calling options.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial/attachments/20201121/8541b6bc/attachment.html>
More information about the Mercurial
mailing list