Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Perforce has Python wrappers around their C/C++ tools, available in binary form for Windows, and source for other platforms:</p> <p><a href="http://www.perforce.com/perforce/loadsupp.html#api" rel="noreferrer">http://www.perforce.com/perforce/loadsupp.html#api</a></p> <p>You will find their documentation of the scripting API to be helpful:</p> <p><a href="http://www.perforce.com/perforce/doc.current/manuals/p4script/p4script.pdf" rel="noreferrer">http://www.perforce.com/perforce/doc.current/manuals/p4script/p4script.pdf</a></p> <p>Use of the Python API is quite similar to the command-line client:</p> <pre><code>PythonWin 2.5.1 (r251:54863, May 1 2007, 17:47:05) [MSC v.1310 32 bit (Intel)] on win32. Portions Copyright 1994-2006 Mark Hammond - see 'Help/About PythonWin' for further copyright information. &gt;&gt;&gt; import P4 &gt;&gt;&gt; p4 = P4.P4() &gt;&gt;&gt; p4.connect() # connect to the default server, with the default clientspec &gt;&gt;&gt; desc = {"Description": "My new changelist description", ... "Change": "new" ... } &gt;&gt;&gt; p4.input = desc &gt;&gt;&gt; p4.run("changelist", "-i") ['Change 2579505 created.'] &gt;&gt;&gt; </code></pre> <p>I'll verify it from the command line:</p> <pre><code>P:\&gt;p4 changelist -o 2579505 # A Perforce Change Specification. # # Change: The change number. 'new' on a new changelist. # Date: The date this specification was last modified. # Client: The client on which the changelist was created. Read-only. # User: The user who created the changelist. # Status: Either 'pending' or 'submitted'. Read-only. # Description: Comments about the changelist. Required. # Jobs: What opened jobs are to be closed by this changelist. # You may delete jobs from this list. (New changelists only.) # Files: What opened files from the default changelist are to be added # to this changelist. You may delete files from this list. # (New changelists only.) Change: 2579505 Date: 2008/10/08 13:57:02 Client: MYCOMPUTER-DT User: myusername Status: pending Description: My new changelist description </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload