Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling +S filetype in Perforce

Tags:

perforce

Perforce's filetype system includes the +S modified to denote that a file is a temporary file. The implication of this is that no file history is stored for that file - only the most recent version is maintained, and it is replaced with each new checkin.

This is obviously a dangerous flag to set accidentally, which we recently discovered. Is there a way to ensure that this is not used in the future?

like image 482
John Stauffer Avatar asked Jun 01 '26 03:06

John Stauffer


1 Answers

You can write a pre-commit trigger that looks at the file list for this flag, rejecting the commit if this is the case.

See this chapter of the Perforce manual for details.

like image 145
Jason Cohen Avatar answered Jun 04 '26 12:06

Jason Cohen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!