Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I move folders between Perforce "depots"

Tags:

perforce

depot

After deleting my Svn repo by accident the other day I wanted to try something else and I have chosen Perforce as my current versioning tool testing ground. It is going great and I am liking what am seeing in Perforce.

Here is my problem. I have submitted my files to my Perforce server and then used my client pcs to grab those projects from the master Perforce server. Now all works great except that I realized that it is possible to use more than a single "depot" in Perforce, and it makes sense to me that I should just move some of those projects to another depot fpr the sake of organization and and maybe for security reasons inn case.

I have been looking for some answers, and I have found couple of them however I am unable to produce any intended results thus I am looking for some expert advice here.

One of the pages I have tried is this one

http://kb.perforce.com/article/24/renaming-depot-directories

Seems to offer a solution, however I have not been able to move files from one depot to another depot that is on the same server process. The examples in the page works fine for moving some folder to a folder in the same depot. The example seems to demonstrate moving to another folder under the same depot.

So I am looking for a reasonable and safe way to move my master Perforce depot folders to another depot that is on the same server, and naturally without loosing any work.

Here is what I am wanting

-- Current

//Depot-A
 -->folder1
 -->folder2

-- I want

//Depot-A
 -->folder1

//Depot-B
 -->folder2

thanks

like image 833
yarun can Avatar asked Nov 12 '12 05:11

yarun can


1 Answers

Moving files between different depots is no different than moving files between folders within the same depot, with the exception that the target depot must already exist. Using your example, and assuming "Depot-B" doesn't exist yet, to move "folder2" from "Depot-A" to "Depot-B", you would simply do this:

p4 depot Depot-B
p4 edit //Depot-A/folder2/...
p4 move //Depot-A/folder2/... //Depot-B/folder2/...
p4 submit
like image 86
raven Avatar answered Oct 04 '22 21:10

raven