1

I am new to perforce. I have a requirement to create a trigger to avoid integrating changes from one particular branch say 'branch_testing' to 'main' branch.

How can we do this? Could you please help?

santosh
  • 421
  • 1
  • 6
  • 14

1 Answers1

1

If you want to absolutely prevent changes from going from branch_testing to main, you need to use the protections table and do one of two things:

  1. Remove "read" access to branch_testing.
  2. Remove "write" access to main.

Otherwise, even if you implement clever controls on the integrate command, there's nothing to stop a user from doing:

p4 sync branch_testing/...
p4 edit main/...
cp -r branch_testing main
p4 submit
Samwise
  • 68,105
  • 3
  • 30
  • 44
  • Sam, Thanks for your reply. Actually we want to other branches to integrate the changes to main branch. My requirement is, i want to prevent only that particular branch 'branch_testing' changes to integrate to main branch.'' We can achieve this only through trigger i guess? – santosh Jul 03 '19 at 08:17