Perforce Public Knowledge Base - Ignoring RCS Keyword Diffs
× PRODUCTS SOLUTIONS CUSTOMERS LEARN SUPPORT
Downloads Company Partners Careers Contact Free Trials
Menu Search
Perforce
Reset Search
 

 

Article

Ignoring RCS Keyword Diffs

« Go Back

Information

 
Problem

How do I ignore RCS keywords when running a diff?

Solution

The Perforce Helix server stores text files with the RCS keywords (of type 'text+k') unexpanded on the server. When files are synced from the server to a Helix client workspace, RCS keywords are expanded.

When merging files between different codelines or streams, RCS keyword expansion is often undesirable, particularly when the keyword expansion is the only thing that changes. Nonetheless, when performing merge operations that propagate files to the client workspace, keywords in text+k files will be automatically expanded in the workspace. Subsequently using the p4 diff command will show these expanded keywords as file differences, or in other words, as trivial or undesired conflicts. There is an open enhancement request to provide an option to suppress this keyword expansion for the purpose of diffing but, as of release 2015.2, this functionality is not yet available.

When receiving code drops from other SCM systems, text files with keywords might already be expanded, and again, the p4 diff command will show conflicting differences between the unexpanded keywords on the server and the expanded keywords on the client. To ignore Helix supported keywords in this case, you must first submit the files to Perforce and then use p4 diff2. The p4 diff2 command does a server-side comparison of files with keywords unexpanded. 

Note: The Perforce Helix server does not support all keywords in third-party SCM systems. See Using RCS Keywords for Helix supported keywords.

When performing the p4 resolve operation after a merge, the server also performs diff operations on the server with keywords unexpanded. In this case, unchanged text files with keywords are seen to be identical (no diffs).

It is possible to  optionally ignore RCS keyword diffs, by using a third party diff tool such as dirdiff. To change a diff tool in P4V, run Edit, Preferences, choose Diff, and add the path to the new diff application in the provided text box.

You can also try scripts available from:

Note: As with any unsupported scripts, you should always test thoroughly on a test server before using with your production data.

Related Links

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255