Wednesday 17 February 2010

Updated Perforce scripts: show-non-p4

It was recently brought to my attention that the links to my Perforce scripts at www.fysh.org/~mac/perforce/ weren't working. These should now be fixed. As part of fixing them I noticed that some of the scripts were a little old and a slightly newer and (IMO) useful script wasn't linked at all.

Over two years ago I complained that it is hard to find files that need adding. Not long after I posted that I wrote a simple script called show-non-p4 to solve this. The script walks the directory tree looking for files that aren't in Perforce and don't match the patterns specified in per-directory .p4ignore files. The script also has a handful of global patterns that it always ignores but these are deliberately conservative.

I've found that when using sufficiently new versions of the P4API I need to lose the call to p4.tagged that occurs in the Ruby scripts. The versions available on that page still contain the line as of this writing though.