开发者

Perforce Integrate command to remove local files/directories which are not present in repository

I am looking for a perforce integrate/get-lat开发者_Python百科est command which would fetch the latest/updated-code and remove the files/folders that have been moved/deleted from the perforce(server) repository.

Is there any way by which I can get a clean copy of the perforce repository, without creating a new workspace/local directory?

Thanks for your interest.


What you're looking for is the sync command. It will grab the latest files, and it will remove any files that were deleted. I'm pretty sure it won't remove the directories, though, at least not on Windows.

To get a clean copy, you can delete the local files, and sync using the '-f' flag.


As of release 2014.1, you can get a clean copy of the repository by using "p4 sync" and "p4 clean". The "p4 sync" command will fetch the latest versions of files from the repository; the "p4 clean" command will remove/refresh anything in your workspace that was not put there by a sync:

http://www.perforce.com/blog/140501/p4-clean-make-workspace-shine

Setting the "rmdir" option in your client spec will tell "sync" and "clean" to remove empty directories as they are emptied by those commands:

http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_client.html#d0e7978

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜