[p4] User initiated Codeline Freezes

Francis Paulin francis.paulin at ubisoft.com
Fri Aug 24 15:19:10 PDT 2007


Hi Scott,

We did something similar here. We use, as you guessed, a trigger. The
trigger was actually a Perl script that performs a check on the
description of the changelist. If the changelist did not contain a
specific tag, an error will be displayed telling the user "The branch is
lock, you can't check-in unless specifying the special tag in your
description". So when using it's along with P4Win (I think it would to
the same with P4V but I'm not sure), there was a message box while
submitting displaying that the submit failed along with the reason
provided by our trigger.

The script offers to important arguments like the tag to add in the
description and an error message to be displayed.

This is not secure way, if people know the tag, they can submit and it
will be easy to retrieve that tag after someone submit a changelist with
the tag in it :), only p4 protect can assure you of a secure way to lock
a branch.

We use this method only to prevent submits done by error. It was a good
way to monitor all changelists being entered in a specific code line.

Hope this help
Francis

-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Scott Marshall
Sent: August 24, 2007 4:56 PM
To: perforce-user at perforce.com
Subject: [p4] User initiated Codeline Freezes

Hi all,

Does any one have any ideas about how to offer a tool/script that p4
users could execute to essentially "freeze" a code line? I know that I
can change permissions in the protect table but that requires admin
access and I don't want to have keep changing this whenever someone
wants to lock a branch. I guess there are triggers that could be
employed but what would be the best way to flag that the branch is
locked vs unlocked?

Any insights would be appreciated.

Thanks,

-Scott

Scott Marshall | Build Engineer

Citrix Online Division 		Phone: 805.690.5832
Citrix Systems, Inc.		Fax: 805. 690.6471 
5385 Hollister Avenue		Email:
scott.marshall at citrix.com 	
Santa Barbara, CA 93111 USA	Web: www.citrix.com 


_______________________________________________
perforce-user mailing list  -  perforce-user at perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user




More information about the perforce-user mailing list