[p4] looking for a script to create a form-out trigger on the changelist form

G. Matthew Rice matt at starnix.com
Sat Mar 3 08:15:26 PST 2007


<markm at emeter.com> writes:
> Does anyone have a script that creates a pre-defined string (template)
> in the changelist description field? And then also a script that will
> validate that string is contained in a submitted changelist description?

You probably won't get an answer to this with a script because the solution
is fairly simple (with Unix and Unix-like tools).

For the form-out trigger just do something like:

        sed 's/<enter description here>/your string/' <in >out

(use the -i option to sed if you don't want to mess with temporary files).

If you want to keep the <enter desc...> string, try something like:

        sed '/<enter description here>/{p;c\
                my text
        }'


On the way in, just use grep to see if the string is still there.

HTH,        
-- 
g. matthew rice <matt at starnix.com>           starnix, toronto, ontario, ca
phone: 647.722.5301 x242                                  gpg id: EF9AAD20
http://www.starnix.com              professional linux services & products


More information about the perforce-user mailing list