Update existing files typemap


Sometimes you may not have all the correct file types specified in your Perforce typemap until after you've imported data.

To update all existing files in the depot to be of type binary, stored uncompressed and with exclusive locking:

p4 retype -n -t binary+Fl //depot/...

Note: Run without -n to actually make this change.

If you want a record of the type change, checkout the file(s), change the filetype, then submit:

p4 edit <files>
p4 reopen -t binary+Fl <files>
p4 submit -d 'Changed filetype' <files>

See the Perforce documentation for more information on file types.

Note that submits of checked out files can undo the retype operation for these files. Opened files need to be identified and the following flow can be used:

$ p4 opened -a //depot/data/...
//depot/data/one#1 - edit default change (binary) by bruno@bruno_ws

$ p4 retype -t binary+Fl //depot/data/...
//depot/data/one#1 - binary now binary+Fl
//depot/data/two#1 - binary now binary+Fl

$ p4 revert -k //depot/data/one
//depot/data/one#1 - was edit, cleared

$ p4 edit -t binary+Fl //depot/data/one
//depot/data/one#1 - opened for edit

$ p4 opened -a //depot/data/...
//depot/data/one#1 - edit default change (binary+Fl) by bruno@bruno_ws *exclusive*