[p4] Change-content trigger help

Rui Casais ruic at funcom.com
Thu Mar 13 03:37:00 PDT 2008


I'm trying to use a change-content trigger to refuse commits if the
changed files have calls to a specific function. Looping over the file
list using "p4 print -q file@=change" to do pattern matching on the full
content of each file works, but seems like a large unnecessary overhead.

Ideally I'd like to use "p4 describe change", but that doesn't seem to
work. The documentation for change-content triggers suggests using
diff2 on each submitted file, but I can't get it to work:

"p4 diff2 file@=change2 file@=change1" complains that I can't use a
revision range with diff2.

"p4 diff2 file#rev2 file#rev1", "p4 diff2 file at cange2 file at change1" and
other variations mixing revision and change list numbers show the files
as identical.

What am I doing wrong?


More information about the perforce-user mailing list