不在 Perforce 中的新文件将被删除在 Perforce 控制之外修改的文件将被重置在 Perforce 控制之外删除的文件将被恢复该命令是p4 reconcile -w"的别名,并使用文件的哈希和来确定它们在您的工作区中的状态.I want a fast solution that does not require force sync that will put a specified directory to its original repository state.same files may be removed from disksame files may be added from disksome files may be modified on disksome files may be marked for removal, addition or modification in perforceAll I want is to be sure that after if run the command I will have none of these. p4 -f sync is not an option, I need a faster solution that does minimize networks usage. Just in case someone asks, perforce proxy is out of discussion.I do know that a partial solution is:p4 diff -sd -se //clientspec/dir/... | p4 -x - revertThe problem is that this does not remove files added to the paths above that are not in perforce - files that I want to be removed from disk.Also, I need a multi or cross platform solution - it has to work on Windows, OS X and Linux. 解决方案 Perforce has added a new command "p4 clean" in 2014.1 that does exactly what you are looking for, by resetting your workspace to its #have state:New files not in Perforce will be deletedFiles modified outside of Perforce control will be resetFiles deleted outside of Perforce control will be restoredThe command is an alias for "p4 reconcile -w" and uses the hashsum of the files to determine their state in your workspace. 这篇关于Perforce 将目录快速同步到干净状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-10 18:50