Search code examples
version-controlperforcedepot

Server-side copy/move of a Perforce folder - without local sync of files


On the project I'm currently working on, we have lots of folders in the /branches and /tags folders (left after the migration from Subversion to Perforce).

I want to clean up the mess - I want to move/copy/rename folders remotely, directly on the depot, without getting them locally. I can't get them locally because we're talking about hundreds of GB and probably millions of files - dozens of branches x ~5GB.

Is it possible to order Perforce to move the folders just on the server?

(I do not have direct access to the Perforce machine, I cannot move folders around on the server or update the Perforce database).


Solution

  • I think that you can construct a workspace that maps all the files in question. You can run sync -k to make Perforce think you have the files locally. Then you can run move -k to move the files on the server.

    Just FYI, p4 copy creates a new branch, whereas p4 move moves an existing branch to a new location.