Release Notes for P4API, the Perforce C/C++ Application Programming Interface Version 2005.1 Introduction For details about installing and using the Perforce C/C++ API, refer to the API User's Guide, posted on the Perforce Web site at: http://www.perforce.com/perforce/technical.html ------------------------------------------------------------------------- New functionality in 2005.1 #72726 It is now possible to set the location of the users ticketfile (P4TICKETS) using the new function ClientApi::SetTicketFile(). #71843 FileSys objects can independantly set their character set overriding the character set set by SetTrans. With this it is possible (but not easy) to maintain multiple server connections to a mix of unicode and non-unicode servers by calling SetTrans before connecting and having clientUser objects which set the character set of FileSys objects correctly for each connection. #70078,69880,69639,68917 'p4 fstat' has a new option '-Rt', this restricts output to non-deleted head revisions. The fstat command also adds the following new fields to OutputStat: desc# -- change description (requires '-e #changelist') otherChange# -- changelist, if opened by someone else digest# -- file digest (requires '-Ol') Bugs fixed in 2005.1 #72406 On Windows clients operating with character set UTF8 use Unicode Windows APIs to get user related environment variables and allow Perforce variables to supply these enviroment values. (Bug #15933) #71755 Some cases of FileSys object creation were not calling the clientUser->File method. Fixed. (Bug #15932) New functionality in 2004.2 #58453 'p4 groups' supports tagged output. By setting the value of "api" to "56" (2003.2) the application will not get tagged output when compiled with 2004.2 API and run against a 2004.2 server. #58420 'p4 where' supports tagged output. By setting the value of "api" to "56" (2003.2) the application will not get tagged output when compiled with 2004.2 API and run against a 2004.2 server. #58146 'p4 diff2' supports tagged output. By setting the value of "api" to "56" (2003.2) the application will not get tagged output when compiled with 2004.2 API and run against a 2004.2 server. Note tagged diff2 output supresses the actual diff of files and only supplies summary information. #58026,53703,53137 'p4 fstat' has new options '-e #changelist', '-Rr', '-Ru', '-Rn' and '-Or'. The flag '-Or' will add these extra fields to OutputStat: resolveAction# -- pending integration record action resolveBaseFile# -- pending integration base file resolveBaseRev# -- pending integration base rev resolveFromFile# -- pending integration from file resolveStartFromRev# -- pending integration from start rev resolveEndFromRev# -- pending integration from end rev Also the new field 'type' will be displayed, if the file is opened on the current client. #57553 New command 'p4 tag', see relnotes.txt for details. #53478 New commands 'p4 login' and 'p4 logout' allow the user to create an authorized connection to the Perforce Server. See relnotes.txt for details. #53302 'p4 users' tagged output will include the field "Password" with a value "enabled" if the user has a password set. #53184 'p4 info' tagged output now has some extra fields. These fields are only output if their functionality is enabled. name value ---- ----- password enabled (if the P4USER is a valid user and password set) monitor enabled (if the monitor counter is set) security enabled (if the security counter is set) unicode enabled (if the unicode counter is set) #52652 Server change 50435 (see release notes) potentially changes the output of the 'p4 diff2' command by fixing a long standing format bug. If your application relies on the old incorrect behaviour, either use the 2003.2 client api or get the old behaviour by setting protocol variable "api" to "56" (2003.2). For the command line 'p4' executable the output can be frozen to 2003.2 output by using -Zapi=56. #51751 'p4 monitor' now sports a '-e' flag which displays extra environment information such as the identity of the client application. To set the identity of a client application the new function ClientApi::SetProg() can be used. e.g. Client client; Error e; client.Init( &e ); client.SetProg( "MyApp" ); Bugs fixed in 2004.2 #62240 SetCwd(const char *) did not search for a new config file as documented and as SetCwd(StrPtr *) did. Fixed (Bug #14646) -------------------------------------------------------------------------- New functionality in 2003.2 #55709 On Windows platforms which have native Unicode support operations which affect the registry will now use Unicode registry operations if the client is operating in Unicode mode with output translation (set via SetTrans) set to UTF8. Prior to this change the registry was set improperly by such applications i.e. P4Win in Unicode mode. After this change it will be possible for P4Win to set registry values for variables like P4USER to values which other clients might not be able to support i.e. values which mix characters from incompatible character sets. #49768 New protocol variable "api" can freeze expected server output to a particular server version. Typically the version of the API you link with dictates any difference in output you may receive from the server. This protocol variable allows you to link with the latest API but avoid having to code for new output format by "freezing" the output behaviour of the server against a particular API release. For example change 46402 below will change the output of the info command if your application sets the "tag" protocol variable. By setting the value of "api" to "55" (2003.1) the application will not get tagged output when compiled with 2003.2 API and run against a 2003.2 server. #46402 'p4 info' supports "tagged" output. #45056 Character set translations exposed to the api: The ClientApi::SetTrans method sets up client character set translations and must be called before connecting to a P4D operating in I18N mode. (i.e. call SetTrans before calling Init) See i18nnotes.txt for more information on I18N mode. The values of arguments to SetTrans are the CharSet enum defined in i18napi.h and you will need to cast that enum into an integer before calling SetTrans. The arguments to the SetTrans method are: output - translation of message output and input arguments content - translation of unicode file contents fnames - translation of file system path names dialog - translation of form specification dialogs A value of zero (0) for all but the output argument will choose a translation based on the other arguments. The simplest and most common usage is to only supply an output character set and all others will follow that. The CharSetApi::Lookup method returns -1 cast into enum CharSet if it does not recognize the argument string as a supported charset. -------------------------------------------------------------------------- New functionality in 2003.1 #41063 New command 'p4 monitor', see relnotes.txt for details. -------------------------------------------------------------------------- New functionality in 2002.2 #35149 New command 'p4 annotate', see relnotes.txt for details. #33571 Tagged output support for 'p4 resolved' and fixes in 'p4 describe'. -------------------------------------------------------------------------- New functionality in 2002.1 #28136 Previously, tagged output for commands were added without regard to the version of the client, but that broke old applications that set the 'tag' protocol and expected it only for commands that produced tagged output at the time. This practice was continued with the introduction of tagged output for 'p4 files/print' and 'p4 integrated' for 2002.1. Now the server checks the version that the client was compiled with and reverts to non-tagged output if the client is pre-2002.1. Applications only need to handle the new tagged output in 2002.1 if they are linked against a 2002.1 API. #26627 Cleanup of the distribution tar file. #26609 Tagged output added for 'p4 files' and 'p4 integrated'. -------------------------------------------------------------------------- New functionality in 2000.2 #19028 New file samplemain.cc included in the api tar file to demonstrate its usage. #18965 API users wishing to intercept client workspace file I/O are now able to by replacing "FileSys *ClientUser::File()" in a ClientUser subclass. -------------------------------------------------------------------------- New functionality in 2000.1 #17253 Tagged output added for 'p4 logger' and 'p4 counters'. -------------------------------------------------------------------------- New functionality in 98.2 #8235 Introduced the StrDict interface that can be used where ever a simple var/value dictionary must be passed around.