Disabling +S filetype in Perforce

perforce

Solution

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.

Problem

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?

Original source