11.07.2015 Views

Perforce 2007.2 System Administrator's Guide

Perforce 2007.2 System Administrator's Guide

Perforce 2007.2 System Administrator's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 3: Administering <strong>Perforce</strong>: Superuser Tasks4. After the upgrade, run:p4 verify -q //...to verify the integrity of your new system.Defining filetypes with p4 typemapBy default, <strong>Perforce</strong> automatically determines if a file is of type text or binary based onan analysis of the first 8192 bytes of a file. If the high bit is clear in each of the first 8192bytes, <strong>Perforce</strong> assumes it to be text; otherwise, it is assumed to be binary.Although this default behavior can be overridden by the use of the -t filetype flag, it’seasy for users to overlook this consideration, particularly in cases where files’ types areusually (but not always) detected correctly. Certain file formats, such as RTF (Rich TextFormat) and Adobe PDF (Portable Document Format), can start with a series of commentfields or other textual data. If these comments are sufficiently long, such files can beerroneously detected by <strong>Perforce</strong> as being of type text.The p4 typemap command solves this problem by enabling system administrators to setup a table that links <strong>Perforce</strong> file types with filename specifications. If an entry in thetypemap table matches a file being added, it overrides the file type that would otherwisebe assigned by the <strong>Perforce</strong> client program. For example, to treat all PDF and RTF files asbinary, use p4 typemap to modify the typemap table as follows:Typemap:binary //....pdfbinary //....rtfThe first three periods (“...”) in the specification are a <strong>Perforce</strong> wildcard specifying thatall files beneath the root directory are to be included in the mapping. The fourth periodand the file extension specify that the specification applies to files ending in .pdf (or.rtf).The following table lists recommended <strong>Perforce</strong> file types and modifiers for common fileextensions.File type <strong>Perforce</strong> file type Description.asp text Active server page file.avi binary+F Video for Windows file.bmp binary Windows bitmap file.btr binary Btrieve database file.cnf text Conference link file.css text Cascading style sheet file.doc binary Microsoft Word document48 <strong>Perforce</strong> <strong>2007.2</strong> <strong>System</strong> Administrator’s <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!