5

I have 3 different Perforce Depots (A, B, and C). Each of these 3 Depots has a long revision history and includes many internally moved & deleted files.

I want to move the contents of A, B, and C to folders inside a new Depot D. Once I do that, I'd like to remove A, B, and C. I tried the the P4 move command within P4V, but I can't seem to get it to move the deleted files from A, B, and C to new folders in D.

Is there any way to do this (either in P4V, P4Admin, or via the command line)? Basically, move an entire Depot into a folder in a new Depot and maintain complete revision history (including deleted files).

Thanks!

philbert1
  • 143
  • 6
  • The fact that you deleted those files implies you no longer need them. Why would you want to move unused files to a new location? – raven Sep 24 '13 at 16:25
  • We work on a Client/Server system, and sometimes we need to dig through P4 changelists to see how the older versions of the Client communicated with the Server. So we want to keep the deleted files as a reference tool. – philbert1 Sep 24 '13 at 16:49
  • Those deleted files will always be there unless an admin obliterates them. If you "dig through P4 changelists to see how the older versions communicated", those changelists will tell you where the files reside. Perforce maintains a complete history even across branching operations. Any old code you want is easily retrieved. I guess I am just not grasping what it is you feel is missing. – raven Sep 24 '13 at 17:35
  • Raven, will that be the case even if the old Depots are deleted? I thought that to delete a Depot you had to obliterate all the files. We basically want to destroy the original Depots, and maintain their contents (complete with deleted files) in a new Depot. – philbert1 Sep 24 '13 at 18:03
  • To delete a depot, you do have to obliterate its contents, but you don't want to do that. It sounds like you want to change history. You want Perforce to pretend those files weren't originally created in A, B and C, but have instead have always resided in D. Not easily done. It's probably possible with some complicated scripting (or via the API) that can reproduce all of the file operations in the new location, along the lines of the Python script they have that can import a VSS data set. – raven Sep 24 '13 at 22:17
  • Raven, I was afraid of something this. I think you're right -- it's probably more effort than it's worth. I'll probably just leave the original Depots intact.If you want to answer the question, I'll mark it answered (for karma:-) – philbert1 Sep 25 '13 at 21:53

1 Answers1

3

It sounds like you want to change history. You want Perforce to pretend those files weren't originally created in A, B and C, but have instead have always resided in D. Not easily done. It's probably possible with some complicated scripting (or via the API) that can reproduce all of the file operations in the new location. Something along the lines of the Python script they have that can import a VSS data set.

raven
  • 18,004
  • 16
  • 81
  • 112
  • 1
    Thanks raven. Yes, I think you're right -- it's probably more effort than it's worth. I think what I'll do is just leave the original Depots intact. – philbert1 Sep 26 '13 at 14:35