[p4] opinions/thoughts solicited...
Jeff A. Bowles
jab at pobox.com
Sat Jul 22 14:33:42 PDT 2000
I have a trigger that combines "p4 resolved" (and "p4 opened"
and "p4 where") to be able to implement policy that allows me
to refuse a change if it's doing integrates from a codeline to
a second codeline that I don't want to allow.
This is to deal with situations where
main -> rel1
rel1 -> main
main -> rel2
rel2 -> main
are all allowed, but
rel1 -> rel2
rel2 -> rel1
are not. (Trust me, sibling-to-sibling integrates are rarely
what you want.)
The output looks like this, reformatted slightly:
p4 submit -c 17
Submitting change 17.
Submit validation failed -- fix problems then use 'p4 submit -c 17'.
Submit check 'nobadcodelines' failed:
Change for //depot/test/main3/1day.pps (from //depot/test/main/1day.pps) is
disallowed.
Change for //depot/test/main3/identity.txt (from
//depot/test/main/identity.txt)
is disallowed.
Change for //depot/test/main3/usradm.pps (from
//depot/test/main/usradm.pps) is disallowed.
Change for //depot/test/main3/xidentity.txt (from
//depot/test/main/xidentity.tx
t) is disallowed.
Change refused.
You are probably integrating from a codeline to some
codeline that isn't its direct parent/child.
This is written in Python, and its main hangup is that it doesn't
use the branch specs (this was a first-shot, and I didn't want to
claim that it would work for the more complex branch view
mechanisms you can set up with "p4 branch"). But it's checked
into the Public Depot for your inspection.
Look at //guest/jeff_bowles/progs/... -- there is a hard-coded
pathname in "parse.py", the comments will point to it...
-Jeff Bowles
More information about the perforce-user
mailing list