<html dir="LTR"> <head> <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" /> <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" /> <title>P4PendingChangelist Class</title> <xml> </xml> <link rel="stylesheet" type="text/css" href="MSDN.css" /> </head> <body id="bodyID" class="dtBODY"> <div id="nsbanner"> <div id="bannerrow1"> <table class="bannerparthead" cellspacing="0" id="Table1"> <tr id="hdr"> <td class="runninghead">Perforce API for the .Net CLR</td> <td class="product"><img alt="P4.Net" src="p4net.GIF" /></td> </tr> </table> </div> <div id="TitleRow"> <h1 class="dtH1">P4PendingChangelist Class</h1> </div> </div> <div id="nstext"> <p> Represents a pending changelist from Perforce. </p> <p>For a list of all members of this type, see <a href="P4API.P4PendingChangelistMembers.html">P4PendingChangelist Members</a>.</p> <p> <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassTopic.htm">System.Object</a> <br /><b>P4API.P4PendingChangelist</b></p> <div class="syntax"> <span class="lang">[VisualBasic]</span> <br />PublicClassP4PendingChangelist</div> <div class="syntax"> <span class="lang">[C#]</span> <div>publicclassP4PendingChangelist</div> </div> <h4 class="dtH4">Remarks</h4> <p> The P4PendindingChangelist object is used to submit files with P4.Net. The first step is to create a new pending changelist, then add the switches "-c", and "1234" (1234 is the changelist number) to all commands that are opening files. In P4.Net, theres no straight-forward way to submit the default pending changelist. This is by design. If the client workspace has opened files in the default changelist before any P4.Net automation runs, those files will "come along for the ride" when you submit the default changelist. If the user has a JobView set, all jobs in that JobView will automatically be fixed when you submit the default changelist. Both of those behaviors are almost never desired, and Ive found many scripts that have those bugs. </p> <h4 class="dtH4">Example</h4> <p> The following example demonstrates submiting files with P4PendingChangelist. <pre class="code" language="C#" escaped="true">P4Connection p4 = new P4Connection(); p4.Connect(); P4PendingChangelist cl = p4.CreatePendingChangelist("My New Changelist\nVery, Very bad description!\nShame on me!"); p4.Run("edit", "-c", cl.Number.ToString(), "//depot/path/foo.cs", "//depot/path/bar.cs"); // Do something to manipulate the files cl.Submit(); p4.Disconnect(); </pre> </p> <h4 class="dtH4">Requirements</h4> <p> <b>Namespace: </b> <a href="P4API.html">P4API</a> </p> <p> <b>Assembly: </b>p4api (in p4api.dll) </p> <h4 class="dtH4">See Also</h4> <p> <a href="P4API.P4PendingChangelistMembers.html">P4PendingChangelist Members</a> | <a href="P4API.html">P4API Namespace</a></p> <object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" viewastext="true" style="display: none;"> <param name="Keyword" value="P4PendingChangelist class, about P4PendingChangelist class"> </param> </object> <hr /> <div id="footer"> <p> <a href="Copyright.html">Copyright 2006 Shawn Hladky</a> </p> <p> </p> </div> </div> </body> </html>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 7341 | Erik Purins |
p4.net --- pull p4.net#head |
||
//guest/shawn_hladky/P4.Net/release/0.9/doc/html/P4API.P4PendingChangelist.html | |||||
#1 | 5831 | Shawn Hladky | P4.Net: Branch release 0.9 and delete a few files missed last time | ||
//guest/shawn_hladky/P4.Net/main/doc/html/P4API.P4PendingChangelist.html | |||||
#1 | 5830 | Shawn Hladky | P4.Net: reorg to support release branches | ||
//guest/shawn_hladky/P4.Net/doc/html/P4API.P4PendingChangelist.html | |||||
#2 | 5825 | Shawn Hladky | P4.Net: Binaries and compiled docs for 0.9 | ||
#1 | 5812 | Shawn Hladky | P4.Net: More documentation. |