3

I'm trying to integrated about 30 changelists from my branch to parent branch and I need to cherry-pick only related CLs.

There is a file File1 that was Updated, Renamed+Moved and Deleted. There are also files File2 - File10 that were added and immediately deleted.

P4 visual client ends with an error that File1 can't be integrated because is already opened on this client.

I tried to manually integrate cherry-picked CLs in bash:

cat changelists | while read CL; do 
  echo "Integrating $CL: "
  p4 integrate -c 123456 //depot/MyBranch/...@="${CL}" //depot/ParentBranch/...
done

This does not complain about existing files, but it does not remove files, that were added and than deleted. Resolving does not offer to remove them. They are just marked for branching.

I tried -Di, -Ds, -f, -3 options, but this was not helpful. I'm not able to remove them manually, because it is almost 200 of files and not everything is my code.


Server version: P4D/LINUX26X86_64/2015.1/1227227 (2015/08/27)
Proxy version: P4P/LINUX26X86_64/2013.3/822226 (2014/04/08)

Kalicz
  • 346
  • 3
  • 13
  • `PATH@=CL` is the syntax for pending changelists. Shouldn't you be using `PATH@CL`? ([read here](http://www.perforce.com/perforce/doc.current/manuals/cmdref/filespecs.html#filespecs.synopsis.using_revision_specifiers)) – sferencik Nov 30 '15 at 07:16

1 Answers1

2

The easiest solution is going to be to submit the first batch of integrates before proceeding. In many cases you can stack up multiple integrates into a single revision, but once the integrate operations require opening the file for different actions (branch vs integrate vs delete vs move etc) you'll get the "already opened for (action)" error and it won't be possible to continue. If you submit the already opened file, a subsequent integrate will be able to create a new revision with the appropriate action.

Samwise
  • 68,105
  • 3
  • 30
  • 44
  • Thanks for reply, but this must be submitted at once. It would break a build otherwise. – Kalicz Nov 29 '15 at 08:37
  • 1
    The next-easiest solution, since all of these files have ended up deleted, is to revert them (this is scriptable, but if there are really only 10 of them doing it manually this one time is easier) and just do the integrate that opens them for delete since you probably don't actually care about the earlier merges. – Samwise Nov 29 '15 at 17:20
  • 1
    Yes, that is what I did. I prepared integration with the script, and than reverted all files that were deleted in my branch. But still, I don't understand why P4 does not do it automaticaly. Add file & remove file should be no file, not branch file. – Kalicz Nov 30 '15 at 07:30