Jump to content

Getting stream name inside a trigger

stream client trigger

  • Please log in to reply
No replies to this topic

#1 moshiko



  • Members
  • Pip
  • 3 posts

Posted 08 November 2015 - 11:00 PM

Hi all

I want to create a trigger for preventing check-out on files if they belong to a specific stream.

I am using the pre-user-edit trigger.

The trigger executes a Perl script.

When I execute in the Perl script a p4 command, then I get this error:
Perforce password (P4PASSWD) invalid or unset.

What I did is getting the stream name out of the client name (which is passed to the Perl script):

    $ stream = `p4 client -o $ client | grep ^Stream: | awk '{print \$  2}'`;
    chomp $ stream;

This does not work.

Also, trying to assign $p4 with new P4, fails.

Anyone has a clue how to solve this?

At least, give me a way to extract the stream name out the client name?


Also tagged with one or more of these keywords: stream, client, trigger

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users