How do I move a Perforce “workspace” folder?

后端 未结 4 797
伪装坚强ぢ
伪装坚强ぢ 2020-12-29 01:22

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

相关标签:
4条回答
  • 2020-12-29 01:26

    If you are using any client (ie: P4V), then you can edit workspace and change the root to the new workspace path.

    0 讨论(0)
  • 2020-12-29 01:33

    As long as you know what changelist you last synced to, you can do this without having to sync again. Here's how:

    1. Note the last changelist synced
    2. Copy/move the folder to the new location
    3. Update your workspace (either the root, or the depot mapping) to point at the new location
    4. Run 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.

    0 讨论(0)
  • 2020-12-29 01:36

    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.

    0 讨论(0)
  • 2020-12-29 01:46

    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.

    0 讨论(0)
提交回复
热议问题