Finding unversioned files in Perforce

For many years I’ve used CVS, and my experience with Subversion started during the pre-alpha days, so I am accustomed to the features they provide. In particular, I make heavy use of the Subversion status command to list not only the files I’ve modified locally, but also the files I’ve created but not yet added to the list of pending changes. It helps tremendously in remembering to add files to the change list before committing.

Recently I was working for Gracenote, which had been using Perforce for the last 10 years. Finding myself using Perforce again after several years, I searched high and low to find a way to get the Perforce command line client to provide me with the ability to discover unversioned files. Alas, I found none. Being that I know how to write halfway passable Python I wrote a script that does exactly what I want:

Admittedly it’s not the prettiest name for a script, but it works and I used it for several months while I was at Gracenote. Hopefully you may find it useful as well.

Update: Recently the p4 command line has introduced a new subcommand called reconcile which makes my script irrelevant. Hurray for progress!

About these ads
This entry was posted in Computing, SCM, Scripting and tagged , . Bookmark the permalink.

2 Responses to Finding unversioned files in Perforce

  1. Gabriel says:

    The link is no longer valid. Do you still have a copy of this script lying around?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s