[p4] does digest exist in depot

Matt Janulewicz matt.janulewicz at lucasfilm.com
Wed Aug 25 15:20:20 PDT 2010

Do you mean you have the digest in hand and want to find the file that 
it's associated with?

'digest' is one of the fields available to fstat, so you should be able 
to search/filter with it. Something like this should do it:

     p4 fstat -Ol -F "digest = <digest>" //some/path/...

-Matt Janulewicz
Lucasfilm Entertainment Company Ltd.

On 08/25/2010 03:01 PM, Christopher Evans wrote:
> Any easy way to simply ask the depot if a file with a hash digest exists?
> I would like to make a trigger that checks if a file exists on the
> server already. I was grabbing all files with the same name, then
> getting their digests, but sometimes the artists rename a file that is
> already in the depot.

More information about the perforce-user mailing list