How to move folders between Perforce "depos"

After deleting my Svn repo, I accidentally wanted to try something else the other day, and I chose Perforce as my current version testing tool. It's great, and I like what I see in Perforce.

Here is my problem. I sent my files to my Perforce server and then used my client PC to capture these projects from the main Perforce server. Now everything works fine, except that I realized that in Perforce you can use more than one "warehouse", and for me it makes sense that I just have to transfer some of these projects to another depot for the organization and, possibly, for reasons security case online.

I was looking for some answers, and I found a couple of them, however I canโ€™t present any intended results, so Iโ€™m looking for some expert advice here.

One of the pages I tried is

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

It seems to offer a solution, but I could not transfer files from one storage location to another storage located on the same server. The examples on the page are great for moving a folder to a folder in the same warehouse. The example seems to demonstrate moving to another folder under the same depot.

So, I'm looking for a reasonable and safe way to move my Masterfor folder depots to another repository located on the same server, and, of course, without losing work.

That's what i want

- current

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

- I want

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

thanks

+6
source share
3 answers

Moving files between different depots is no different from moving files between folders in the same depot, except that the destination repository must already exist. Using your example and assuming "Depot-B" does not exist yet, move "folder2" from "Depot-A" to "Depot-B", you simply do this:

 p4 depot Depot-B p4 edit //Depot-A/folder2/... p4 move //Depot-A/folder2/... //Depot-B/folder2/... p4 submit 
+5
source

Here I would do (in a nutshell): If you open a P4V session and select the tab with the changes made, you can filter this set to display only those changes that relate to the section that you want to move. This is the set of changes that you will duplicate on the new depot (or even the server) that you want to fill out. The idea is that you unravel the archive files on one side and end them the same way at the destination. Thus, the process simply (1) synchronizes with the first list of changes, (2) integrating it into a new place, (3) checking what is installed, and (4) proceeding to the next list of changes. Obviously, this could be a scenario. I am currently working on a script in python, but any decent scripting language with Perforce function libraries will work. A few complications: the change lists will be sequentially the same as the originals, but the original time will not be - they will be "current". And, of course, if there are tags, you will need to display this in a new place if you want them to be saved.

0
source

I do not think that additional storage significantly improves security. Several depot scenarios mostly arise with a very large installation.

The main advantage of additional storage is that you can get more control over the location of your serverโ€™s disk space, for example, if your repository is too large to fit into one file system, and you need to expand it to use multiple file systems. The second reason for creating additional warehouses is if you have a depot of specialized types; for example, if you want to create a Streams repository to use the Perforce Streams feature.

For a script such as the one you are describing, having all of your files under Depot A is probably fine in the foreseeable future.

-1
source

All Articles