Eventually I just looked at the THG source code and I've listed below the variables which you can pass from THG to your custom commands. In doing that I also realized that the custom tool window tooltips show the same information! So its been there all along, just not noticed (by me).
Here's what the source code has to say:
You can use several {VARIABLES}
to compose your command.
Common variables:
{ROOT}
: The path to the current repository root.
{REV}
/ {REVID}
: Selected revisions numbers / hexadecimal' revision id hashes respectively formatted as a revset' expression.
{SELECTEDFILES}
: The list of files selected by the user on the ' revision details file list.
{FILES}
: The list of files touched by the selected revisions.
{ALLFILES}
: All the files tracked by Mercurial on the selected' revisions.
Pair selection variables:
{REV_A}
/ {REVID_A}
: the first selected revision number / ' hexadecimal revision id hash respectively.
{REV_B}
/ {REVID_B}
: the second selected revision number / ' hexadecimal revision id hash respectively.
And here's where the tooltip makes itself known:
Note that aside from the Command
input, it also seems that you can use the same variables in the Working Directory
input.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…