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:Rick Macdonald (ric@vsl.com)
Date:04/18/2001 06:20:53 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?

# From what I've read here, this seems to be best solved by putting the views into text files in the depot, and having some kind of trigger script to modify the clientspecs when the view changes. I suggested something like this:

We have a set of files in a specific location in the Perforce depot. The first type of file would be a view file. Each view file is a text file which has a number of lines for the view. The clientspec name in this file would be replaced with a parsable wildcard pattern. You'd have lines like this:

//depot/fred/... //%1/fred/... //depot/george/... //%1/george/...

The second type of file, of which there would be only one, would contain names of clientspecs, and the names of the views which go into that clientspec. Something like:

USER1_MACHINE_FRED view1.txt USER1_MACHINE_FRED view2.txt USER2_MACHINE_FRED view1.txt USER3_MACHINE_FRED view1.txt USER3_MACHINE_FRED view3.txt

This would mean that USER1_MACHINE_FRED would have a view consisting of the contents of view1.txt followed by the contents of view2.txt, for example.

Finally, you have a trigger script on the view files and the the clientspec list file which would update the views for each clientspec listed in the clientspec file from the views in the view files it specifies. You would never edit one of those clientspecs directly - instead you would edit the view file.

When you want to create a new clientspec, you simply make the new clientspec, filling in everything but the view, then put a new entry in the clientspec file.

Does anyone know of a better approach? Are there any examples of trigger scripts to do this kind of thing that people can point me to?

-->Steve Bennett