Perforce Integrate 命令删除存储库中不存在的本地文件/目录
我正在寻找一个perforce集成/获取最新命令,它将获取最新/更新的代码并删除已从perforce(服务器)存储库移动/删除的文件/文件夹。
有什么方法可以让我获得 perforce 存储库的干净副本,而无需创建新的工作区/本地目录?
感谢您的关注。
I am looking for a perforce integrate/get-latest 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您正在寻找的是 sync 命令。它将获取最新的文件,并删除所有已删除的文件。不过,我很确定它不会删除这些目录,至少在 Windows 上不会。
要获得干净的副本,您可以删除本地文件,并使用“-f”标志进行同步。
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.
从版本 2014.1 开始,您可以使用“p4sync”和“p4clean”获取存储库的干净副本。 “p4sync”命令将从存储库中获取最新版本的文件; “p4 clean”命令将删除/刷新工作区中未通过同步放置的所有内容:
http://www.perforce.com/blog/140501/p4-clean-make-workspace-shine
在客户端规范中设置“rmdir”选项将告诉“sync”和“clean”以删除被这些命令清空的空目录:
http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_client.html#d0e7978
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