Jump to content

Does p4.exe wait until finished before returning?

  • Please log in to reply
1 reply to this topic

#1 sabibo



  • Members
  • Pip
  • 2 posts

Posted 02 August 2019 - 07:09 PM


  I have a batch script which calls edit on a bunch of binary files, then compiles them, and then reverts the unchanged files before submitting. I keep getting this problem where all, or most, of the files are submitted even though they are unchanged.

It doesn't seem to happen if I pause in the debugger between the revert and the submit.  That leads me to wonder if somehow the revert process is returning before it is actually finished, and then the submit is submitting a bunch of files that should have been reverted.
Could that be happening?  Or does the command line revert not return until it is totally finished?


#2 Sambwise


    Advanced Member

  • Members
  • PipPipPip
  • 1029 posts

Posted 02 August 2019 - 10:52 PM

p4.exe won't return until it's completely finished running whatever command(s) you gave it, but you didn't include your script so it's not obvious to me that your script is waiting for its previous invocation of p4.exe to return before spinning up the next one, or that the revert might not be hitting some kind of error.

Why not just submit with -f revertunchanged so it's all done atomically within the submit command?

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users