1

I am trying to move a crazy amount of files on perforce.
It was almost done on my first attempt using p4 integ -v
However, the integ command 'copies' the selected files.
I have to delete the source files and leave only target files for some reason.

Next, I tried p4 move command. This command has no -v option with it.
It is also impossible to sync all files to my local machine. (tens of TB)
Does anyone know how to perform p4 move without actually sync it?

Now, I've tried -k option to fake perforce out:

p4 sync -k //src_dir/...
p4 edit    //src_dir/...
p4 move -k //src_dir/...  //tar_dir/...

But Perforce reports submit failed because I don't have //tar_dir in my local machine. Did I missed anything?

PeterHsu
  • 111
  • 1
  • 1
  • 8

1 Answers1

2

Unless you specifically require the "p4 move" semantics (e.g. maintaining atomicity of each add/delete pair when integrating to other branches -- and since it sounds like you're doing this on an entire branch or even multiple branches I'm guessing you DON'T want that), I'd recommend doing:

p4 copy   -v //src_dir/... //tar_dir/...
p4 sync   -k //src_dir/...
p4 delete -k //src_dir/...
p4 submit
Samwise
  • 68,105
  • 3
  • 30
  • 44
  • Thanks. It's actually works. Here's something to note: I tried mixed all of the commands in a single changelist then submit but failed. It's seems my P4 don't allow me to copy and delete the source in the same time. So I'll suggest "do only single item in single changelist" – PeterHsu Apr 09 '15 at 02:56
  • Btw, I found p4 delete has -v option. So sync/delete pair could be merged as delete -v – PeterHsu Apr 09 '15 at 02:57
  • You should in general be able to copy a file and delete the source (not the target) of the copy in a single changelist, since a copy does not open the source file -- my guess is that the error you encountered was unrelated. Whatever works, though! :) – Samwise Apr 09 '15 at 03:09