[p4] Modifying Changelist form

Kamlesh Mutha mkamlesh at gmail.com
Fri Aug 21 00:46:07 PDT 2009


Just a step ahead, I want to get some more information from User for each
submission.

Something like:

Backlog / Feature Description:

Change Description :

Code reviewed by:

Unit Testing done : Yes / No

Klockwork run : Yes / No


This text can also be included in the change form as discussed before in
this thread.

But can we have some additional form which will pop up at the time of
submit/changelist creation, with all such questions so that we have
information related to any change stored on perforce server.


Thanks and Regards,

Kamlesh.




On Tue, Aug 11, 2009 at 10:48 PM, Ivey, William <william_ivey at bmc.com>wrote:

> My "reviewer" trigger looks for the the string that's normally
> only found in new change forms: "<enter description here>" so it
> won't add the "reviewed by" line again to an existing change
> form. It's written for bourne shell (standard for our triggers)
> and uses the sed command, but otherwise it is very similar to
> what you have:
>
> sed -e "s/<enter description here>/&\n\n# Fill in reviewer's name\
>  below\nReviewer: <name>/" "$formFile" > "$TMPFILE"
>
> (The & inserts the matched text, then follows it with a blank
> line, a comment, and the Reviewer: field.
>
> -Wm
>
>
> -----Original Message-----
> From: perforce-user-bounces at perforce.com [mailto:
> perforce-user-bounces at perforce.com] On Behalf Of Kamlesh Mutha
> Sent: Saturday, August 08, 2009 3:39 AM
> To: Perforce Users Mailing List
> Subject: [p4] Modifying Changelist form
>
> Hi All,
>
> Objective is to insert "ReviewedBy" field text in every changelist form.
> This is what I have done and seems to be working fine in my test setup.
>
> Trigger Script:
>
> #!/usr/bin/perl
> $formfile = $ARGV[0];  # from %formfile% in trigger table
>
> $defaultin = "^Description:";
> $defaultout = "Description:\n\tReviewedBy =>\n";
>
> # Build a modified workspace spec based on contents of %formfile%
> $modifiedform = "";
> open FORM, $formfile or die "Trigger couldn't read form tempfile";
> while ( <FORM> )
> {       ## Do the substitution as appropriate.
>        if ( m:$defaultin: ) { $_ = "$defaultout"; }
>        $modifiedform .= $_;
> }
> # Write the modified spec back to the %formfile%,
> open MODFORM, ">$formfile" or die "Couldn't write form tempfile";
> print MODFORM $modifiedform;
> exit 0;
> [ Snippet of the script from perforce site ]
>
> Triggers setup :
>
> Triggers:
>        reviwer form-out change "/home/builduser/modify_change.pl
> %formfile%"
>
>
> Does this look alright or is there any better way to do it?
>
> Thanks and Regards,
> Kamlesh
>
>
>
>
>
> --
> Faith waiting in the heart of a seed promises a miracle of life which it
> can
> not prove!
> -Ravindranath Tagore
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>



-- 
Faith waiting in the heart of a seed promises a miracle of life which it can
not prove!
-Ravindranath Tagore



More information about the perforce-user mailing list