如何将 Perforce“工作区”移动到文件夹?
我刚刚将 4.5GB 的软件仓库下载到硬盘上的某个位置并不理想。
我想将 Perforce 现在视为“工作区”文件夹 (iPhone) 的文件夹移动到硬盘上的另一个文件夹(项目名称),然后使用该文件夹作为工作区文件夹。
这可能吗,还是我需要重新下载整个软件仓库?
I've just downloaded a 4.5GB depot to a location on my hard drive that is not ideal.
I'd like to move the folder that Perforce now sees as the "workspace" folder (iPhone) to another folder on my hard disk (Project Name), and then use that folder as the workspace folder.
Is this possible, or do I need to download the entire depot again?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
在 P4V 应用程序中:
打开“工作区”对话框:
转到连接>编辑当前工作空间...
将“工作区根目录:”更改为您喜欢的位置
如果您尚未移动文件,P4V 会为您复制它们。
in the P4V application:
Open the Workspace dialog:
Go to Connection>Edit Current Workspace...
change "Workspace root:" to where you like
If you have not already moved the files, P4V will offer to copy them for you.
只要您知道上次同步到的变更列表,您就可以执行此操作,而无需再次同步。操作方法如下:
p4lush //depot/path/to/ folder/...@
刷新命令告诉服务器您在指定的路径、指定的更改列表中拥有文件。它是
p4sync -k
的同义词。As long as you know what changelist you last synced to, you can do this without having to sync again. Here's how:
p4 flush //depot/path/to/folder/...@<last_changelist>
The flush command tells the server that you have the files at the path specified, at the changelist specified. It's a synonym for
p4 sync -k
.迈克的答案几乎是正确的,除了移动工作空间(更改根目录)时不需要
p4sync -k
。 P4 不关心根目录在哪里,它只通过工作区/客户端名称跟踪计算机上的文件。如果您想更改工作区名称(这需要您创建一个新工作区)并使用已同步工作区中的文件填充它,则需要运行
p4sync -k
让服务器知道这个新工作区在@changeset
处有这些文件。Mike's answer is almost correct, except that the
p4 sync -k
is not required when moving a workspace (changing the root). P4 does not care where the root is, it only tracks the files on your machine by workspace/client name.If you wanted to change the workspace name (which would require you to create a new workspace) and populate it with files from an already synced workspace, you would then need to run
p4 sync -k
to let the server know that this new workspace has these files at@changeset
.如果您使用任何客户端(即:P4V),则可以编辑工作空间并将根更改为新的工作空间路径。
If you are using any client (ie: P4V), then you can edit workspace and change the root to the new workspace path.