0

I'll be honest. I prefer git and I'm familiar with it.

But for the sake of a task, I have to move a file from one repository to another. This question may already be asked, but I'm just not familiar with perforce terminology.

I need to move fileA from Rep1 to Rep2 with p4 move to retain the files history.

Sake of example:

Rep1

+FolderA

+FolderAA
  *FileA

to

Rep2

+FolderA

+FolderAA
  *FileA <-- got here be p4 move

Again, I'm very unfamiliar with perforce and as much as I hate being spoonfed, I will need to this time.

Tim Z.
  • 251
  • 1
  • 12
  • Check this out: http://stackoverflow.com/questions/13338841/how-do-i-move-folders-between-perforce-depots – Phil Wallach Jun 19 '14 at 23:33
  • Is "Depots" the same as "repos" then? – Tim Z. Jun 19 '14 at 23:34
  • Possibly :) I don't know what a "repo" is. But a "depot" is the highest level of organisation in Perforce. But you can use multiple depots at once. So the answer I indicated should show you how to do that. – Phil Wallach Jun 19 '14 at 23:37
  • @ Phil Wallach The only difference is that in that example, my "Depot-B" already exists. So how do I tell one depot that another one exists? – Tim Z. Jun 24 '14 at 20:39
  • You need to create the new depot using the "p4 depot" command. You can use "p4 help depot" to get help. Both of these depots then exist within the same Perforce server. – Phil Wallach Jun 24 '14 at 23:54

1 Answers1

1

I am not sure if by 'repository', you mean a different directory on the same Perforce server, but if so, then follow the steps here:

http://answers.perforce.com/articles/KB_Article/Renaming-Depot-Directories

For 2009.1+ Perforce servers, use 'p4 move'.

  EXAMPLE 

  p4 edit //Rep1/FolderAA/FileA
  p4 move //Rep1/FolderAA/FileA //Rep2/FolderAA/FileA
  p4 submit

In P4V, you can select the source folder/file to be moved, right-click and select 'Rename/Move'. Then specify the new location.

P4Shimada
  • 758
  • 4
  • 8