Search code examples
perforceperforce-client-spec

Retrieving projects without binary files


We have multiple very large perforce repositories with many binary files mixed in with source code. Is it possible to configure a client spec so that certain file extensions (e.g. zip, jar, war, etc.) are never synced to the local copy?

We are syncing periodically to generate metrics on source code, and for this purpose the binary files just get in the way.


Solution

  • In your client spec, use the "exclusionary" mappings, with a minus sign, as so:

    View:
        //depot/project/... //client-name/project/...
        -//depot/project/.../*.zip //client-name/project/.../*.zip
        -//depot/project/.../*.jar //client-name/project/.../*.jar
        -//depot/project/.../*.war //client-name/project/.../*.war