mejdev
mejdev

Reputation: 3758

Does p4 sync also verify the local files?

I'm writing a build script that creates a workspace and syncs the workspace to download all of the files in a specific depot. I want to verify the downloaded files, or at least make sure they are verified somewhere along the way.

I'm already running p4 sync to download the files, but does p4 sync also verify them/check them against their checksum? Would it be redundant for me to verify them after p4 sync?

Upvotes: 1

Views: 939

Answers (1)

Daniel Kamil Kozar
Daniel Kamil Kozar

Reputation: 19286

The only thing p4 sync does is comparing the file revision (the number after the # in the filename given by Perforce clients) in the workspace and in the depot. The revision from the depot is then downloaded into the workspace if it is newer than the workspace one.

As far as I know, there is no checksumming anywhere when it comes to verifying files (or their revisions) in Perforce. If you want to do it this way, you'll have to manually run a checksum function on the workspace file and the depot file (which you'd need to download separately into a temporary directory), but doing it like this will defeat the purpose of the whole procedure.

Upvotes: 2

Related Questions