Names
Its important to name your commands appropriately, Mercurial will automatically renameLambda
and StatefulLambda
commands to match a convention. Command
names are used to identify the command within a larger structure, this is
especially important when it comes to errors within commands.
When naming a command this ‘rename’ function is used
Errors
When your code in a command throws an error Mercurial will catch it and spit out an s-expression representation of the command. For a simple command that is being run directly, this is just the name of the command, and Mercurial will tell you the phase that it crashed in. We’ll use this command to demonstrate.lambda
is scheduled, this error message will be displayed as part of the
stack trace:
group
is scheduled, this error message will be displayed as part of the
stack trace:
ERR
.
S-expressions are easy to read, and make it easy to group information together.
As we look at each of the group and utility commands, we will also explore their
representation.