1

I would like to make a trigger that only executes for a single user(myself). The reason, is so that I don't "break the build".

Longer explanation: I'm trying to sandbox a Clearcase trigger to automatically apply an attribute to an element when it is checked in, and I don't want to accidentally create a trigger that applies to all developers and potentially ruin everybody's day with the prototype(what works on the first try?).

I see the -nus/ers option which seems to exclude users in the list. I suppose I could comma separate a list of all users, excepting myself. Is this what I'm looking for?

wizurd
  • 3,541
  • 3
  • 33
  • 50

1 Answers1

1

The best sources of information about triggers are listed here, and then EV (Environment Variables) are mentioned in mktrype man page.

Check for isntance:

CLEARCASE_USER 

The user who issued the command that caused the trigger to fire; derived from the UNIX or Linux real user ID or the Windows user ID.

If the user id somehow doesn't work, you could consider other environment variables:

CLEARCASE_SNAPSHOT_PN 

Your script can control if the user id is yours, and if not, abort.

The path to the root of the snapshot view directory in which the operation that caused the trigger to fire took place.

If your script detect that the path isn't the exact one expected (ie your snapshot view from which your triggered your script), said trigger script would abort.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250