[p4] A tool to list all files that haven't been added
Arnt Gulbrandsen
arnt at gulbrandsen.priv.no
Fri Jun 2 03:42:46 PDT 2006
Sam Roberts writes:
> On Thu, Jun 01, 2006 at 12:52:41PM -0400, David Faison wrote:
>> On windows, you could type the following:
>>
>> dir /a-d /b /s | p4 -x- fstat | find "no such file"
>>
>> And it would only list files that have not been added to perforce.
>> This would also correctly ignore files that have been added but not
>> yet submitted to Perforce.
>
> And would it also list every .obj/.class file and other build artifacts?
There are better alternatives. I've written several myself. Right now I
have two, one I wrote to use and one I wrote because I was really bored
that day, much better than the first one. It uses the following, highly
complex algorithm:
1. Ask the build system which files are necessary to build.
2. Ask p4 which files are version-controlled.
3. a-b.
I expect everyone here can implement that algorithm for their build
system without expending too many grey cells. (But if you use jam, you
can have a copy of mine.)
Arnt
More information about the perforce-user
mailing list