4 messages in com.perforce.perforce-user[p4] P4 SUBMIT from scripts without b...
FromSent OnAttachments
Thor Erik Karlsen18 Apr 2001 01:13 
chris patti18 Apr 2001 05:57 
Rick Macdonald18 Apr 2001 06:20 
Sandy Currier23 Apr 2001 13:07 
Subject:[p4] P4 SUBMIT from scripts without bringing up default EDITOR
From:chris patti (cpa@atg.com)
Date:04/18/2001 05:57:52 AM
List:com.perforce.perforce-user

On Wed, 18 Apr 2001, Thor Erik Karlsen wrote:

Hello all! I want to run P4 SUBMIT from a servlet but I don't want the default editor to pop up, but pass the 'Description' value from the command line instead. This is because the servlet is running on a servber and the P4 operations can not be remotely controlled. Is this possible? Any ideas on how this problem can be solved?

If my understanding is correct you in fact cannot do it exactly the way you're saying here.

What you'd do is a p4 submit -i - this from p4 help submit (The online help is VERY good you know :)

The -i flag causes a changelist specification (including files to be submitted) to be read from the standard input. The user's editor is not invoked.

You'd create a submission template including the files you wanted submitted and then do p4 submit -i templatename and you'd be set.

The real tricky bit comes in parsing the responses you get from the server - the -s option is marginally helpful here but the designations for what is an 'error' vs 'info' or 'warnings' are sometimes bizarre in the extreme - e.g. p4 sync where all files are up to date is reported as an *error*.

In any case investigate the -s option, it may be your last best hope for sanity :)

-Chris

--------------------------------------------------------------------