Wikis - Page

Trigger input file format examples

0 Likes

"FAQ 6: Are there any trigger input file format examples?
QUESTION:
Are there any trigger input file format examples?

ANSWER:
Yes, below are some examples of pre-promote and server-post-promote trigger input file formats.

They assume the following conditions:
Brad, does a promote from the acme_brad workspace into the acme_int
stream of the files:
/foo.txt
/gzip/acinclude.m4
/gzip/bits.c

The comment used was: "Promoting my sample changes"
The bug fixed was 5396

Example command:
C:\demo\ws\acme_brad\gzip>accurev promote -c "Promoting my sample changes" -p

Client-side input file:
=======================
Format:
<hook> (The type of trigger)
<project> (The depot name)
<stream> (Stream promoting FROM)
<comment> (Promote comment - can be more than one line)
<topdir> (Top of the user's workspace)
<author> (AccuRev user / principal doing the promote)
<files> (Files involved in the transaction - can be more than one line)

In order to pass the bug number to the server, this input file needs to be over-written with the bug number(s) on a single line.

Sample client-side trigger input file would be the following:
pre-promote
acme
acme_brad
Promoting my sample changes
c:/demo/ws/acme_brad
brad
/foo.txt
/gzip/acinclude.m4
/gzip/bits.c


Server-side input file:
=======================
Format:
<hook> (The type of trigger)
<project> (The depot name)
<stream> (Stream promoting TO)
<from_client_promote> (This will contain the bug number(s) being passed to the server)
<transaction_num> (The transaction number)
<transaction_time> (The time of the transaction)
<comment> (Promote comment - can be more than one line)
<author> (AccuRev user / principal doing the promote)
<files> (Files involved in the transaction - can be more than one line)
NOTE: on the server-side input, the format of the files will be:
<filename> <version> <element_type>

Sample server-side trigger input file would be the following:
server-post-promote
acme
acme_int
5396
52
2003/09/09 19:16:07
Promoting my sample changes
brad
/foo.txt 15/4 2
/gzip/acinclude.m4 15/3 2
/gzip/bits.c 15/7 2"

Comment List
Related
Recommended