AW: [MERGE][RFC] Enhanced hooks
Voelker, Bernhard
bernhard.voelker at siemens.com
Wed Feb 6 06:52:51 GMT 2008
Ian Clatworthy wrote:
> More often than not, Perl will be used for the last case as that's the
> language the majority of sysadmins use for glue like this. Passing
some
> basic stuff in via string parameters is therefore good enough.
e.g. ClearCase (centralized+comm. VCS) doesn't use argv style argument
passing
to hooks (there: trigger), but simple environment variables.
So the script/program doesn't have to bother about command line parsing.
There are environment variables for the current action (dep. on the
action) for:
* the file name,
* the branch name and version number,
* maybe the predecessing version of the file,
* ...
For each action, a different set of variables is provided and denoted in
the man page.
Pre-action triggers can prevent the action by simply returning
TRUE/FALSE.
This can e.g. be used for HOC or other syntax checks.
Not a bad idea ...
Have a nice day,
Berny
More information about the bazaar
mailing list