Problem with 'Perforce Submit' Action

Hi,

I'm trying to use the 'Perforce Submit' action but keep getting an error:

Getting files in default changelist...
Submit changelist built.
CMD Line: -c BUILDSERVER -u buildmaster submit -i
Error in change specification.
Can't include file(s) not already opened.
Open new files with p4 add, p4 edit, etc.
Action Failed
C:\Program Files\Perforce\p4.exe returned : 1

To eliminate other unknowns, I created a FB test project where I simply checkout a file (Perforce Edit), write to the file, then attempt a Perforce Submit.  The 'Perforce Edit' action is working correctly; the file does get checked out.

Based on the error above, P4 obviously doesn't like the change spec -- how can see the change spec being submitted by FB?

If I create my own change spec and submit it with the specified "CMD Line", the submit works fine:

C:\Documents and Settings\Mike>p4 -c BUILDSERVER -u buildmaster submit -i < c:\temp\changespec.txt

One other thing... I've been using 'Perforce Submit' for a couple months and it was working fine for me.  However, due to a recent drive crash, I've had to reinstall both FinalBuilder and Perforce, so I have the latest versions of each:
FinalBuilder: 5.5.0.518
P4V Installer (Client): 2007.2/138826)
Perforce Server version: P4D/NTX86/2007.3/140673 (2007/11/29)

Any idea what's going on here?

Thanks.

 

Hi Mike,

I’ll see if we can do a test build which logs the names of the files for the default change list. I’ll get back to you when this is available.

The list is generated by running the Perforce ‘opened’ command, so running this command manually may give you some idea as to what file is causing the error.

Regards,

Angus

Thanks Angus. I did more debug with the ‘opened’ command & captured it with logging. I issued the ‘opened’ command just after ‘p4 edit’ and just before ‘p4 submit’, just to be sure the file was still opened in the default changelist (and it was). See log below.

Thanks,
-Mike



[OPENING FILE FOR EDIT]

------------ p4 edit --------------
CMD Line: -c BUILDSERVER -u buildmaster //depot/src/versionInfo.h
//depot/src/versionInfo.h#19 - currently opened for edit


------------ p4 opened ------------
CMD Line: -c BUILDSERVER -u buildmaster opened -c default -C BUILDSERVER
//depot/src/versionInfo.h#19 - edit default change (text) by buildmaster@BUILDSERVER




[SUBMITTING EDITED FILE]


------------ p4 opened ------------
CMD Line: -c BUILDSERVER -u buildmaster opened -c default -C BUILDSERVER
//depot/src/versionInfo.h#19 - edit default change (text) by buildmaster@BUILDSERVER


------------ p4 submit ------------
Getting files in default changelist…
Submit changelist built.
CMD Line: -c BUILDSERVER -u buildmaster submit -i
Error in change specification.
Can’t include file(s) not already opened.
Open new files with p4 add, p4 edit, etc.
Action Failed
C:\Program Files\Perforce\p4.exe returned : 1

I was able to find a workaround for this issue. If I issue the ‘Perforce Create Changelist’ action before ‘Perforce Submit’, and then use the changelist number in the submit action, it works fine:

Perforce Create Changelist (Create new changelist, save changelist number to FB variable; Use files in default changelist)
Perforce Submit (Submit specified changelist number)

So, the problem seems to be limited to submitting the default changelist.

Hi Mike,

I’m glad you found a workaround. Please let us know if there’s anything else we can do to help with this - possibly it is just a Perforce inconsistency?

Regards,

Angus

I’m not exactly sure where the problem is… I am able to submit the default changelist using the Perforce command line (p4.exe), as long as the changelist submitted via stdin is correct.

You mentioned that the FinalBuilder changelist is created via the Perforce “opened” command… is it possible that the output of this command has changed (since I’m now using the latest Perforce Server for Windows) and it’s not being parsed properly in the FinalBuilder action, therefore the changelist being provided to the submit command is incorrect?

-Mike

Hi Mike,

I see. Tate is our Perforce expert, and I’ll refer this to him when he gets back to the office on Monday.

In the meantime, we now have a test build which logs the files in the default changelist when you use the submit command. If you get a chance, please download it and let us know if the output is what you expected.

https://www.finalbuilder.com/downloads/finalbuilder/550/FB550_579.exe

Regards,

Angus

Thanks for that build! The problem seems to be that the 'opened' command within the 'Perforce Submit' action is not restricted to the default changelist -- it returns files opened under all changelists. I have/had other files opened in a numbered changelist. When the submit command was issued against the default changelist, the changelist spec included files not opened in the default changelist, so it caused the error:

CMD Line: -c BUILDSERVER -u buildmaster submit -i
Error in change specification.
Can't include file(s) not already opened.

I do think still needs to work properly with the default changelist, however based on what I've learned, I will do all my Perforce actions with a numbered changelist, such as:

  • Perforce create Changelist (empty changelist; save changelist number to variable)
  • Perforce open for Edit (specify file and changelist number)  
  • ... make changes to file ... 
  • Perforce Submit (specify changelist number)

This seems to be the safest way to go, since there's really no guarantee what is or isn't opened in the default changelist.
-Mike