开发者

Verify Perforce client file copies

开发者 https://www.devze.com 2023-03-29 16:41 出处:网络
I have a large Perforce depot and I believe my client currently has about 2GB of files that are in sync with the server, but what\'s the best way to verify my files are complete, in-sync, and up to da

I have a large Perforce depot and I believe my client currently has about 2GB of files that are in sync with the server, but what's the best way to verify my files are complete, in-sync, and up to date to a given change level (which is perhaps higher then a handful of files on the client currently)?

I see the p4 verify command, and it's MD5s, but these just seem to be from the server's various revisions for the file. Is there a way to compare the MD5 on the server with the MD5 of the revision required 开发者_开发百科on my client?

I am basically trying to minimize bandwidth and time consumed to achieve a complete verification. I don't want to have to sync -f to a specific revision number. I'd just like a list of any files that are inconsistent with the change level I am attempting to attain. Then I can programmatically force a sync of those few files.


You want "p4 diff -se".

This should do an md5 hash of the client's file and compare it to the stored hash on the server.


Perforce is designed to work when you keep it informed about the checked out status of all your files. If you or other programmers in your team are using perforce and editing files that are not checked out then that is the real issue you should fix.


There is p4 clean -n (equivalent to p4 reconcile -w -n)

which would also get you a list of files that p4 would update. Of course you could also pass a changelist to align to. You might want to disable checking for local files that it would delete tho!

If you don't have many incoming updates one might consider an offline local manifest file with sizes and hashes of all the files in the repository. Iterating over it and checking for existence, size and hash yielding missing or changed files.

In our company, having the p4 server on the intranet checking via local manifest it's actually not much faster than asking for p4 clean. But a little!! And it uses no bandwidth at all. Now over internet and VPN even better!!

0

精彩评论

暂无评论...
验证码 换一张
取 消