Release Notes for P4API, the Helix Application Programming Interface for C/C++ Version 2016.2 Introduction For details about installing and using the Helix C/C++ API, refer to the API User's Guide, posted on the Perforce Web site at: http://www.perforce.com/perforce/technical.html Supported Platforms Linux kernel 2.6+ for Intel(x86,x86_64) Windows for Intel(ntx86,ntx64) Mac OS X 10.5, 10.6, 10.7, 10.8, 10.9, 10.10 for Intel(x86,x86_64) Apple Darwin 9.0 for Intel(x86,x86_64) ------------------------------------------------------------------------- Important Platform End-of-Life Notice This notice identifies the platforms that will be placed in End-of-Life (EOL) status on November 2017. This applies to p4, p4d, p4p, p4ftp, p4broker and p4api components of the server release. The following platforms have entered the Obsolescent phase in this release: Linux kernel 2.6+ for ARM Linux kernel 2.6+ for 64-bit Itanium Windows 7 for Intel(x86, x64) Windows 2008 for 64-bit Itanium(ia64) FreeBSD 10.0 for Intel(x86, x86_64) OBSOLESCENT Phase: Starting with this release, these platforms will no longer be supported. Customers will receive full support and patches for the deprecated platforms during this phase for older releases. The platforms will remain in this phase until November 2017 after which they will transition into the discontinued phase. DISCONTINUED (EOL) Phase: Patches will no longer be issued for these platforms. We will no longer provide technical support to customers with servers on these platforms ------------------------------------------------------------------------- Important Security Note This release links OpenSSL version 1.0.2n. Note: 2016.2 patch 8 upgrades to OpenSSL 1.0.2n ------------------------------------------------------------------------- Minor new functionality in 2016.2 #1442162 (Bug #16821) * ** A new configurable 'filesys.checklinks' can be used to prevent files being added that have a symlink in their directory path. When this configurable is set to '1', trying to 'p4 add' a file that is symbolically linked below the client root will fail. Setting this configurable to '2' allows the user to bypass the check by using the '-f' (force) option. #1414787 (Bug #1649) ** New integration/resolve records have been added with 'how' values of 'undid', 'undone by', 'moved from/undid', and 'moved into/undone'. These records will be returned as their nearest pre-2016.2 equivalents ('ignored' and 'moved') when a pre-2016.2 'api' protocol value is used. #1393673 (Bug #83614, #84042) * Detection of the utf8 file type has changed and some undocumented client side configuration can further change the behaviors. The new behavior should be consisent for unicode and non-unicode mode servers. #1393111 (Bug #76582) * ** Tagged output for commands may now send their output in multiple chunks, which are assembled in the client. The ClientUser function OutputStatPartial allows clients to handle these individual partial chunks. If this function returns zero, the partial chunk is added to the results that will be we passed to the next call of the OutputStat function. If OutputStatPartial returns non-zero, the results are considered to have already been processed and will not be included in the results passed to the next call of the OutputStat function. Bugs fixed in 2016.2 Patch 8 Upgrade of OpenSSL libraries to 1.0.2n Bugs fixed in 2016.2 Patch 5 Upgrade of OpenSSL libraries to 1.0.2l Bugs fixed in 2016.2 Patch 4 #1506799 (Bug #90653) * The ServerHelperApi function SetApplication() allows for setting the application for special application only licensed servers. (app=application). This is required when using the api for DVCS connections to a remote server with one of these licenses. Bugs fixed in 2016.2 Patch 2 #1483314 (Bug #89040) * P4CLIENTPATH and the dvcs related P4INITROOT no longer restrict files from being written into the system temporary directory or the directory given by TEMP or TMP. To support this, there is a new Client::GetTempPath call. Upgrade of OpenSSL libraries to 1.0.2k ------------------------------------------------------------------------- ------------------------------------------------------------------------- Major new functionality in 2016.1 #1357095 (Bug #5897) * ** The client must set the 'expandAndmaps' protocol to indicate that it supports the one-to-many Ditto (&) mappings. This will affect the output of 'p4 fstat', changing the unique fields from depotFile and headRev to depotFile, clientFile and headRev. Clients setting this protocol variable must be able to handle multiple 'p4 fstat' results for a single depotFile with differing clientFile values. #1243015 * ** New protocol variable "autoLogin" will cause the server to prompt for login if any command is run when the user is not authenticated. The command line 'p4' executable sets this variable by default unless: - an alternative output formatter is specified. - any of the STDIO pipes are not connected to a console. This behavior can also be disabled by using -Zapi=79. Minor New functionality in 2016.1 #1357368 (Bug #83544) * The SetDeleteonClose() and ClearDeleteOnClose() FileSys methods are now virtual. #1304928 * ** It is no longer necessary to set the "enableStreams" protocol in order to enable output for stream depots, starting with the 2016.1 server. Setting the protocol explicitly to the value "no" will revert to the old behavior of hiding stream depots. #1261012 (Bug #83413) * The ClientApi function SetExecutable allows the client to specify the exact location of its executable program file, which is used by the parallel sync and parallel submit implementations to spawn new client instances on demand. Bugs fixed in 2016.1 PATCH 12 #1459845 (Bug #89040) * P4CLIENTPATH and the dvcs related P4INITROOT no longer restrict files from being written into the system temporary directory or the directory given by TEMP or TMP. To support this, there is a new Client::GetTempPath call. Bugs fixed in 2016.1 PATCH 6 #1448344 (Bug #79551) * Performance of the RSH protocol on Windows been improved in cases where a break callback is being used. Bugs fixed in 2016.1 PATCH 5 #1445732 (Bug #88666) * The MapApi function Insert now handles the MapType 'MapOneToMany' correctly. Bugs fixed in 2016.1 PATCH 4 #1409225 (Bug #87290) * The ServerHelperApi function SetServerExecutable allows the client to specify the exact location of the server executable program file that will used to initialize DVCS instances. Bugs fixed in 2016.1 PATCH 3 #1398982 (Bug #87036) ** Spec comments would leave gaps in lists returned in tagged mode. For example, take this Protections table: write user * * //... ## All users can write super user admin * //... ## Comment on the last line The tagged output for this table prior to this patch would be: ... Protections0 write user * * //... ... ProtectionsComment0 ## All users can write ... Protections2 super user admin * //... ... ProtectionsComment3 ## Comment on the last line The tagged output for this table with this patch is: ... Protections0 write user * * //... ... ProtectionsComment0 ## All users can write ... Protections1 ... Protections2 super user admin * //... ... ProtectionsComment3 ## Comment on the last line ... Protections3 As comments are handled as separate fields to the line content, but within the same list, the comments increment the same line number counter used by the line content. This is clear and understandable for whole line comments, but inline comments must use the same line number as the line content: the line number is still incremented, so the line number on these comments are set to 1 less than the that incremented number. Empty line content tags are now added for the comment lines so that tools that iterate over line numbers do not mistakenly stop at the first comment. The recommended way to handle tagged output of specs with comment support is to increment over lists using the spec field names. For each line also check if a Comment tag for that line is present. If there is both line content and a comment, the comment is inline. If there is no line content but there is a comment, that comment is a full line comment. If there is no line content and no comment, skip the line: these empty lines are caused by inline comments that have incremented the line number as explained above. Bugs fixed in 2016.1 PATCH 1 #1383934 (Bug #86041) ** Change handling of utf8 server type files when working with clients <= 2015.1. For these clients, the utf8 type files are treated as server type text, so as to avoid any additional line-ending. These files will not have associated BOMs (Byte order marks) when they are synced in this case. This has no bearing with clients >= 2015.2. Bugs fixed in 2016.1 #1323224 (Bug #84441) * 'p4 clone' would mis-handle depot file paths containing spaces. ------------------------------------------------------------------------- ------------------------------------------------------------------------- Major new functionality in 2015.2 #1060366 * The new ServerHelperApi class provides access to the DVCS init and clone functionality. The p4dvcsapi.cc sample application shows examples of how this class may be used. Minor New functionality in 2015.2 #1261076 (Bug #83413) * The ClientApi function SetExecutable allows the client to specify the exact location of its executable program file, which is used by the parallel sync and parallel submit implementations to spawn new client instances on demand. #1067861 (Bugs #40729,#79069) ** The server will now display the canonical filetype for a file, as introduced by change #7724, and will no longer display the shorthand alias, for all clients at API level 79 or above. So, for example, 'p4 opened' for a file of type 'binary+Sw' will now display: '//depot/foo#1 - add default change (binary+Sw)' rather than '//depot/foo#1 - add default change (ctempobj)'. If your application relies on receiving the shorthand aliases, either continue to use the 2015.1 (or older) client API, or get the old behavior by setting protocol variable "api" to 78 (2015.1). For the command line 'p4' executable, the output can be frozen to 2015.1 output by using -Zapi=78. Bugs fixed in 2015.2 #1323224 (Bug #84441) * 'p4 clone' would mis-handle depot file paths containing spaces. Bugs fixed in 2015.2 PATCH 6 #1376672 (Bug #86041) ** Change handling of utf8 server type files when working with clients <= 2015.1. For these clients, the utf8 type files are treated as server type text, so as to avoid any additional line-ending. These files will not have associated BOMs (Byte order marks) when they are synced in this case. This has no bearing with clients >= 2015.2. Bugs fixed in 2015.2 PATCH 5 #1333858 (Bugs #84753) ** Web application SSL client init sometimes fails randomly due to a reuse of client processes with stale SSL state information. Error has been seen with some p4php clients in the context of a Helix Swarm server. Bugs fixed in 2015.2 PATCH 3 #1318469 (Bug #84220) * The ServerHelperApi class now passes ClientUser::ProgressIndicator() and ClientUser::CreateProgress() onto the provided ClientUser object during ServerHelperApi::CloneFromRemote() instead of using the default implementation which reports to STDOUT. Bugs fixed in 2015.2 PATCH 2 #1311048 ** Updated OpenSSL version to 1.0.1q. Please see: http://www.openssl.org/news/openssl-1.0.1-notes.html for details on fixed vulnerabilities. Bugs fixed in 2015.2 #1028453 ** Updated OpenSSL version to 1.0.1m. Please see: http://www.openssl.org/news/openssl-1.0.1-notes.html for details on fixed vulnerabilites. ------------------------------------------------------------------------- ------------------------------------------------------------------------- Minor New functionality in 2015.1 #967271 (Bug #75557) ** 'p4 status' now displays opened files in addition to files needing reconcile. This is restricted to clients >= 2015.1. With tagged output, files that are opened also contain the tag field 'change'. Bugs fixed in 2015.1 #1062781 (Bug #74254) ** Tagged output for 'p4 submit' from an edge server no longer generates duplicate entries for depotFile, rev, and change. This was caused by the intermediate shelving step which output its own tagged data. This has been fixed. #966093 (Bug #5617) The ClientUser class now keeps track of the file being edited in case of spec interactive editing and removes it or keeps it depending on subsequent errors. #958875 (Bug #75414) The new p4 enviroment file gets written with trailing CRLF on platforms where that is not the native line ending. Fixed. The file can still be read with either line endings. ------------------------------------------------------------------------- ------------------------------------------------------------------------- Major new functionality in 2014.2 #820182 (Bug #41143) * A new p4 enviroment file is in use and clients will now detect the unicode mode of a server automatically. New Api calls related to this functionality are SetEnviroFile(), IsUnicode(), and GetTrans(). Automatic detection of unicode mode can be disabled by calling SetTrans() prior to calling Init(). A SetTrans(0) call before Init() should suppress auto unicode detection and give behavior compatible with earlier api versions. Minor new functionality in 2014.2 #786045 * The FileSys::Set() method now takes an optional Error argument. On some platforms, if the Error argument is specified, the Set() method will issue an error for an invalid filename. #785519 * The FileSys class now supports an Fsync() method, to allow a a client to make an explicit fsync request on an open file. Bugs fixed in 2014.2 PATCH1 #941282 * Failed P4CHARSET detection would cause subsequent commands to return a failed error code even if they succeed. Bugs fixed in 2014.2 #819008 * For the MacOS X api, using the special Apple filetypes 'apple', 'resource', etc. could cause a mismatch between malloc and delete methods. Fixed. ------------------------------------------------------------------------- ------------------------------------------------------------------------- Minor new functionality in 2014.1 #712696 (Bug #68946) * The P4IGNORE functionality that designates paths to be ignored by 'p4 add' is now exposed via the ClientApi class. To test whether a given file path is ignored, call: client->GetIgnore()->Reject( path, client->GetIgnoreFile() ) Bugs fixed in 2014.1 #797382 (Bug #70966) * An API client which connects to a Forwarding Replica or Edge Server and which uses the SetProg() method to control its program name, will now find the program name is properly received by both the replica server and the master server. #750787 (Bug #70120) * On Mac OS X (and the Darwin build also) syncing a file might fail with Operation not permitted because of the user immutable flag on files. We now remove this flag to complete the file transfer. #749946 (Bugs #29923, #70101) * UTF16 file detection changed to help block audio files from being detected as UTF16. Files which start with a UTF16 BOM (Byte order mark) but which are not valid UTF16 or do not meet some textual tests will be considered binary. #740482 (Bug #69603) * Conversions between the different Unicode UTF formats allow the code positions U+FFFE and U+FFFF now. These are 'sentinels' not characters and do not have printable forms, but are translatable. #725776 (Bug #69242) * Error objects containing more than 8 sub-errors can now be retrieved and displayed by client programs. #699932 (Bug #19001) * The FileSys class members Modtime and ChmodTime were affecting both the modification time of files and the access time of files. Now only the modification time is set to the specified time and the access time is set to the current time. (On Windows the access time is left alone) ------------------------------------------------------------------------- ------------------------------------------------------------------------- Minor new functionality in 2013.2 #589668 (Bug #17341, #41143) * ** Two usability improvements have been made for Unicode mode servers: 1) A default value for the client's P4CHARSET will now be chosen based on the platform and code page if P4CHARSET is not set explicitly. 2) Files of type 'unicode' will now have the character set versioned along with the file type. Clients can opt to operate on files using the character set stored on the server by calling ClientApi::SetDefaultCharset( "server" ); Bugs fixed in 2013.2 #657039 (Bug #66722) * If an SSL connection fails due to a fingerprint problem, the arguments of that failed command would be repeated on a subsequent command (such as p4 trust). Fixed. Bugs fixed in 2013.1 #643488 (Bug #66215) * In response to customer requests, the FileSys::SetDigest(), method is now virtual. Major new functionality in 2012.2 New ClientUserProgress class which shows Textual progress indications. New methods in ClientUser (CreateProgress, and ProgressIndicator). See api documentation for details. Bugs fixed in 2012.2 #517451 (Bug #59321) * A small memory leak in the client-side resolve logic has been fixed. #504635 (Bug #57507) * The Windows version of the api now uses native Win32 calls to get environment variables. This fixes problems with not seeing changes to the environment when the api is linked via a DLL. Commonly seen in derived APIs such as p4perl. Major new functionality in 2012.1 #372184,#373711 (Bugs #2493, #9875) *** ** * P4PORT settings may now include the 'ssl:' prefix. In addition, the existing but undocumented 'tcp:' prefix is now fully documented and supported; it can be useful for cases where you desire to explicitly indicate that the connection is cleartext. The 'ssl:' prefix may be specified in P4PORT values to cause the client and server to use SSL encryption of network traffic. If this prefix is used, it must be used in both server and and client. An SSL-enabled server will only accept connections from SSL-enabled clients, and a server which does not specify the ssl: prefix will not accept connections from clients that do. Minor new functionality in 2012.1 #404305 The new function ClientApi::SetCwdNoReload(), sets the client current working directory, without reloading any P4CONFIG files found in the directory hierarchy. #403942 ** 'p4 info' will now return the new 'ServerID' tag if issued against a server with a non-empty serverid. #373418,#376875,#381501 If any of the server, proxy or broker is using encryption the "p4 info" command will now display a field for each of the servers along the path from the client to p4d that are encrypted. No field will be displayed if the server, proxy or broker is not encrypted. For tagged output these flags are: serverEncryption encrypted proxyEncryption encrypted (Note that the p4broker does not supply tagged output) For non-tagged output these flags are: Server encryption: encrypted Proxy encryption: encrypted Broker encryption: encrypted #371134 Error messages formatting, Error::Fmt(), now may optionally prepend a unique error code to the formatted text. #319018 The new function ClientApi::GetBuild returns a version string identifying the particular build of the C++ API being used. Bugs fixed in 2012.1 #453494 (Bug #55245) * The sample Jamfile is updated to reference the SSL stub library. #417685 (Bug #52442) * A client command may now pass up to 256 command-line flags. Note that has changed, and all programs that include it must be recompiled. Major new functionality in 2011.1 #274187 The new functionality in the 2011.1 release of resolving non- content actions requires clients to implement a new function to interactively prompt the user to pick one of a set of available choices. The new ClientResolveA class holds all of the messages associated with a non-content resolve (similar to ClientMerge for content resolves), and a new variant of ClientUser::Resolve() is called with ClientResolveA to invoke an interactive non-content resolve. Client applications that do not implement this new ClientUser method should set the "api" variable to 69 or lower to prevent the server from attempting to invoke it. Non-content resolves may still be resolved "automatically" (p4 resolve -ax) without invoking this method. #268731 The client must set the 'enableStreams' variable to indicate that it implements functionality pertaining to streams. Minor new functionality in 2011.1 #316111 'p4 resolve' can now provide tagged output when in interactive mode. Note that only the server-provided portion of the output is tagged; the prompt and diff information are produced client-side and are not part of the tagged output. If the 'api' variable is 68 or lower tagged output will remain disabled for interactive resolve. #300903 (Bug #28749) Added 'charcvt.h' header to distribution. #293927 Server change 293927 modifies the message when attempting to "p4 copy" identical files from "all revisions integrated" to "file(s) up to date." Set the "api" variable to 68 or lower for the old message. Bugs fixed in 2011.1 #385159 (Bug #49324) * On Windows Vista, Windows 7, or Windows 2008, a client running as Administrator would fail to properly process file names in non-ASCII character sets (such as Shift-JIS). #279151 (Bug #42411) valgrind would complain about a benign issue when P4CLIENT is not set. Fixed. ------------------------------------------------------------------------- ------------------------------------------------------------------------- Major new functionality in 2010.2 #273171 (Bug #41826) Tagged output for 'p4 describe' and 'p4 changes' now includes the field 'path' which is the common path root for submitted files. #264717 The p4 client, and the C++ client API, now support client protected regions. Perforce client regions define "safe areas" in a Perforce client's filesystem where files can be accessed or modified, under the control of the Perforce server (through the API); any attempt by a Perforce server to direct participating client APIs to access or modify files outside a client protected region will cause a client-side error in the client API and the relevant files will not be touched. To enable this feature, you may define the P4CLIENTPATH variable (as an environment variable, via 'p4 set', or in a P4CONFIG file) to a (semicolon-separated) list of one or more local filesystem directories. #259145 The new 'annotate -I' flag introduced by change 259145 includes extra data when tagged output is enabled. In addition to the normal 'upper' and 'lower' values, an arbitrarily long series of 'depotFileN', 'upperN', and 'lowerN' values will indicate each link in the integration 'chain' for that line, starting with the most recent. Although the regular 'upper' and 'lower' values are always given as changelists to avoid ambiguity, since these extra value sets include depot paths they will use revision values if the '-c' flag is not specified explicitly. #255892 (Bug #1492) The change spec has a new field, 'Type', to specify whether a change is 'public' or 'restricted'. Tagged output for 'p4 change' now has a new 'Type' field. Also, 'p4 describe' and 'p4 changes' have the new tagged field of 'type'. #251199 The RhTagged() class now has a new method, Success(), which returns a non-zero value if the filter argument is passed for a given row (output). #242064 (Bug #34736) ClientUserMarshall::Diff() now captures diff output in a temp file and routes it through OutputText. This causes diff output to be serialized to the appropriate output format (e.g. Python, Ruby, or PHP). #240229 There is a new ClientUser::Diff() method that takes an optional target file, allowing diff output to be captured instead of going directly to stdout. Minor new functionality in 2010.2 #250349 (Bug #7605) The server now tracks the date when each user changed their password, and also provides a simple password aging mechanism. There are several new tagged fields as a result. New tagged fields for 'p4 users' are 'Password', 'TicketExpiration', and 'PasswordChange'. The 'p4 user' command has the new tagged field 'PasswordChange'. The 'p4 groups' command has the new tagged field 'passTimeout'. Finally, the 'p4 group' command has the new tagged field 'PasswordTimeout'. #250142 A new type of user, 'service user', can be defined. The new tagged field of 'Type' in 'p4 user' and 'p4 users' shows whether a user is 'standard' or 'service'. Bugs Fixed in 2010.2 #285118 (Bug #43225) Support for Windows junction points did not work for FileSys objects of type utf8. Fixed. #283496 (Bug #43019) The tagged field of 'type' in 'p4 changes' and 'p4 describe' has been changed to 'changeType' to avoid problems when parsing the 'type<#>' field in tagged output for 'p4 describe'. #277078 (Bug #30412) Several typos were corrected in the sample Jamfile included in the API distribution, and the name of the sample Jamfile has been corrected from 'Jamfile.api' to simply 'Jamfile'. ------------------------------------------------------------------------- Minor new functionality in 2010.1 #242851 Server change 242851 modifies the error on submitting an edit of a deleted file from "must revert" to "must sync & add or revert". Set the "api" variable to 66 or lower for the old error. Bugs Fixed in 2010.1 #232454 (Bug #1870) Server change 232454 (see release notes) changes the informational message reported when the files are identical from "No file(s) to diff" to "No differing files". If your application relies on the old incorrect behavior, either use the 2009.2 client api or get the old behavior by setting protocol variable "api" to "66" (2009.2). For the command line 'p4' executable the output can be frozen to 2009.2 output by using -Zapi=66. #230346 (Bug #37298) The core client api no longer depends on the Carbon framework for Mac OS X. It instead depends on these three frameworks: CoreServices, ApplicationServices, Foundation. P4EDITOR values now require ".app" to be appended if specifying a graphical application. By default, P4EDITOR now has the value "open -Wtn". ------------------------------------------------------------------------- ------------------------------------------------------------------------- Major new functionality in 2009.2 #209833 The string operator StrOps::Words() interface has been changed to correctly handle quotes. Example of new quote handling: "foo bar" -> (foo) (bar) foo" "bar -> (foo) (bar) "foo""bar" -> (foo"bar) foo""bar -> (foo"bar) #213991 Output for 'p4 fstat' will also contain the tagged field "revtime" when used with the '-Rs -e' options. This field represents the time that the file in the change was shelved. #208353 The 'p4 shelve' command introduces the new tagged value 'shelved'. The following commands with tagged output will output 'shelved' if the specified change contains shelved files: p4 changes -s pending p4 changes -s shelved p4 describe (on a pending changelist) p4 describe -S (on a pending changelist) The new 'fstat -Rs -e files' command will output 'shelved' for each file that is shelved at the specified change. #198015 Seek method now takes an Error * parameter and works for buffered file types. Note, if you Read and Write to the same open buffered file, you MUST have a Seek call between the change from Writing to Reading and vis versa. This has really always been true. new Tell method for binary and buffered FileSys Minor new functionality in 2009.2 #219154 FileSys::ReadLine return value of -1 instead of 1 if the line read is a partial line due to line size limitation. The line size is set by FileSys buffer size tunable. Bugs Fixed in 2009.2 #232016 (Bug #37534) Changes to the client/server network connection handling did not check for certain error conditions on windows. An application could fail with the message 'WSAEWOULDBLOCK'. #228870 (Bug #37215) The new client/server network connection handling logic could sometimes receive an error due to a select() call being interrupted. This error was only seen on Linux clients and has been fixed. #221747 (Bug #35741) If a client is connected to a server and the connection is lost while the client is idle between commands to that server, the client commands silently fail without error or results. Fixed. #209582 (Bug #34832) Tagged output for 'p4 describe' for submitted changelists now includes the fields 'fromFile' and 'fromRev' when the file has been moved. ------------------------------------------------------------------------- ------------------------------------------------------------------------- Major new functionality in 2009.1 #197669 (Bug #33482) Tagged output for 'p4 opened' now includes the field haveRev. #187587 (Bug #32338) Tagged output for 'p4 describe' for submitted changes now includes fields for digest and fileSize for files in the change if those values have already been computed. #177023 The 'p4 move' command introduces new tagged fieldnames (used by fstat and opened). movedFile -- name in depot of moved to/from file movedRev -- head revision of moved file Also the tagged field 'action' has two new values, 'move/add' and 'move/delete'. This new value will appear in the the tagged output of many commands. For backwards compatability the client may force these new actions to the less descriptive 'add' and 'delete' values by setting the 'api' protocol level to 64 or less. Bugs Fixed in 2009.1 #205388 Server change 205388 (see release notes) potentially changes the output of the 'p4 filelog -m -i' command by fixing a long standing revision bug. If your application relies on the old incorrect behaviour, either use the 2008.2 client api or get the old behaviour by setting protocol variable "api" to "64" (2008.2). For the command line 'p4' executable the output can be frozen to 2008.2 output by using -Zapi=64. #200645 (Bug #33896) Tagged output (or other than C++ apis) from 'p4 jobs' against a unicode server with user defined fields which are not translateable into the P4CHARSET could crash the p4 command line or other p4 api programs. #184408 (Bug #28944) The close-on-exec flag is now set on the client/server socket where available. #179833 (Bug #31215) Using the SetBreak callback support when the file descriptor communicating with the server is higher than FD_SETSIZE could cause api crashes or data smashes. Fixed. ------------------------------------------------------------------------- ------------------------------------------------------------------------- Major new functionality in 2008.2 #165501 (Bug #30696) Previously deleted ErrorIds have been resurrected so that clients built with a newer version of the api can handle errors from old servers. #164513 (Bug #30497) Tagged output for 'p4 labels' now includes Revision field for automatic labels. #160205 (Bug #30087) Tagged output for 'p4 clients' now includes LineEnd option. ------------------------------------------------------------------------- ------------------------------------------------------------------------- Major new functionality in 2008.1 #152210 (Bug #28448, #28980) In response to customer requests, both the FileSys::Digest(), and FileSys::MakeLocalTemp() methods are now virtual. #149295 The logic that the server uses to combine and interpret views is now available client-side and exposed in the new MapApi class, defined in mapapi.h. Client developers may use this new class to simulate the behavior of client views, protections, branch views, and combinations thereof without running server commands. Bugs Fixed in 2008.1 #153603 (Bug #28729) Unicode mode clients on Windows platforms running with a P4CHARSET of utf8 could get error messages which contain a mix of utf8 and a system character set. With this fix, the system error message portion should also be in utf8. ------------------------------------------------------------------------- ------------------------------------------------------------------------- Major new functionality in 2007.3 #137472 (Bug #7546, 26830) Trigger standard output is now passed to the client on success (via OutputMsg()). Clients may override the ClientUser::Message() method to handle this output by testing for this informational message (E_INFO) using Error::CheckId( MsgServer::TriggerOutput ). Note that '# include "msgserver.h"' is needed in the source file that references this server message. Clients may force the old behavior by setting the 'api' protocol level to 61 or less. #136840 (Bug #21738) The private member 'generic' of the Error class in error.h was changed to 'genericCode' to accommodate C#. #132645 (Bug #18895, #23542) Tagged output for 'p4 clients' now includes AltRoots and SubmitOptions. #130733 (Bug #25273) Tagged output for 'p4 groups -v [group]' includes new field 'isValidUser' which indicates whether the user or subgroup member is a real user or group. #130647 (Bug #25344, #23629) Tagged output for 'p4 groups' now includes the maxLockTime field for each user/group record. #130380 (Bug #20634) Tagged output for 'p4 info' run through the proxy now shows the proxy version string (proxyVersion). Note that this also requires the 2007.3+ version of the proxy. #130049,130052 (Bug #301, #5315) The tagged output for 'p4 describe' and 'p4 changes' now contain 'oldChange' with the original changelist, if the changelist was automatically renumbered upon submit. #130035 (Bug #25343) 'p4 sync' has a new 'change' field in tagged output that displays the highest change number of the files being synced. #128872 (Bug #25268) Added GetErrors method to ClientApi class. GetErrors() provides a count of errors returned by the server and can be used to determine if a call to Run() succeeds or fails without calling Final(). #128587 (Bug #25244) Enhanced the StrArray class to support editing and removal of individual elements. #124651 (Bug #20926) Added virtual destructor to KeepAlive class to remove compiler warnings. ------------------------------------------------------------------------- ------------------------------------------------------------------------- Major functionality in 2007.2 #119531 'p4 where' has a new 'remap' field in tagged output that indicates that the mapping is a '+' mapping. #119231 (Bug #18070) The FileSys type member is now protected rather than private, allowing subclasses to get/set the type easily. #119366 (Bug #19881) Restructure the API distribution.The new structure puts all of the header files under an "include/p4/" directory structure and the libraries in a "lib/" directory. For existing programs, update the '-I', '-L' and '-l' compile and link lines to these new locations. If there is a name conflict, then use the "#include " syntax for all references to the p4api headers and change the '-I' line to the "include/" directory. #118804 (Bug #21294) Added 'strarray.h' header to distribution. FileSys::ScanDir returns this type so this header provides the information needed in order to use this return result. #116379 (Bug #23661) FileSys::Path() is now a virtual function, with Name() merely calling Path(). With the virtual Set() this makes it easier to subclass FileSys for the purpose of adjusting filesystem path names. ------------------------------------------------------------------------- ------------------------------------------------------------------------- Major new functionality in 2007.1 #110420 The 'p4 filelog' command has added the following new field to OutputStat: digest# -- file revision digest Bugs fixed in 2007.1 #119595 FileSys::CheckFile used to check for missing symlinks would report a symlink was missing if the target of the symlink was missing. Fixed. #118729 Forcing a merge to resolve via 'accept merge' when conflict markers are present caused improper tamper check results in GUI programs. Fixed. ------------------------------------------------------------------------- ------------------------------------------------------------------------- Major new functionality in 2006.2 #107305 The FileSys::Stat method on FileSys objects which were created as symbolic links now behaves identically as other normal FileSys objects. Previously, the Stat method on symlink typed FileSys objects would only return 0 or FSF_EXISTS. Now, if you want to check for a symlink existing, you should check for FSF_SYMLINK, as the FSF_EXISTS bit will indicate if the symlink points to an existing file not regarding the symlink itself. #100486 The 'p4 sync' command has added the following new fields to OutputStat: fileSize -- size of file to be transferred totalFileSize -- total file transfer size * totalFileCount -- total file count * * These two fields are sent only with the first OutputStat call. #98998 The zlib library within the api now has symbols prefixed with 'PZ_' to allow linking different versions of zlib into api programs without conflict. This may require api programs supply their own zlib instead of linking with the one in the api. Bugs fixed in 2006.2 #114374 (Bug #23004) * The dialog parameter of the SetTrans call to enable client unicode mode was ignored if the output and content parameters differed from each other. In this case dialogs were not translated or verified causing whatever information to be stored in the server metadata. With the server in unicode mode, this data is assumed to be utf8. Fixed so that the dialog parameter is honored and if it is not given it defaults to the same as the output parameter. #105043 (Bug #21822) Errors encountered from Spec::Spec(const char *string, const char *cmt, Error *e) will no longer crash the server. Note that the definition has been widened to include Error* e as the last parameter. Now callers must pass the Error *e and handle the error upon return, when previously an error from this call would simply abort the client (and possibly the server). #104834 (Bug #21822) Errors encountered from PathSys::Create( int ) will no longer crash the server. Furthermore, the method with this signature is no longer public to the api since it was never fully supported in the api. Api users must use one of the other public PathSys::Create() methods which are fully supported with error handling and better defined parameters. ------------------------------------------------------------------------- ------------------------------------------------------------------------- Major new functionality in 2006.1 #94587 (Bug #20225) New ClientMerge::DetectResolve() allows access to the ClientMerge::Resolve() functionality that compares the edited result against the generated yours/theirs/merge to produce a default action (accept your, theirs, merge, edit). #93935 (Bug #20187) Added StrOps::Upper() to match StrOps::Lower() for in place conversion of all characters to uppercase. #93388,93387 Use of the 'const_char #define has been removed from the API and all client code should be updated to reflect this change. To update code to compile against this version of the API, search for 'const_char' and replace with 'const char'. Additionally, compile time errors will be generated for invalid use of 'char' instead of 'const char' for derived classes. #91869 (Bug #13802, #19872) The fstat command has added the following new field to OutputStat: headModTime -- head rev mod time, if in depot Bugs fixed in 2006.1 #94815 (Bug #20294) Tagged output for 'p4 jobs' now shows the normalized values of the "Job" field instead of the raw values. Now guis can use this value without modification when its value is used in forms. #92564 (Bug #19980) Tagged output for 'p4 fix' would send spurious output to OutputInfo() in addition to OutputStat(). Now it correctly only sends data via OutputStat(). ------------------------------------------------------------------------- ------------------------------------------------------------------------- Major new functionality in 2005.2 #85237 Many more commands now support tagged output. By setting the value of "api" to "57" (2005.1) the application will not get tagged output when compiled with 2005.2 API and run against a 2005.2 server. New commands with tagged output are as follows: monitor (change 75907) have (change 75926) depots (change 75945) reviews (change 75981) branch -o (change 77156) change -o (change 77156) client -o (change 77156) job -o (change 77156) label -o (change 77156) trigger -o (change 77156) user -o (change 77156) add (change 77729) edit (change 77729) delete (change 77729) verify (change 78033) reopen (change 78136) lock (change 78192) unlock (change 78192) sync (change 78329) labelsync (change 79507) integrate (change 80315) revert (change 80316) review (change 80826) fix (change 81204) attribute (change 82886) interchanges (change 83150) counter (change 83810) obliterate (change 84782) diff* (change 84951) submit (change 85142) resolve* (change 85237) Note that 'resolve' and 'diff' are not fully tagged. Only 'resolve -n', 'resolve -ay', and 'resolve -at' are tagged because other resolve options generate output from the client which cannot be tagged. Only the summary data of 'diff' is tagged. The actual diff output is not tagged because the diffs originate from the client (ClientUser::Diff()). For tagged diff output, the summary data is passed to OutputStat(), but the actual diffs are generated and subsequently output by the client in its version of ClientUser::Diff(). #84505 The ClientApi::GetConfig() method allows client applications to find out the name of the P4CONFIG file found by the last Enviro::Config() call. If none was found,, "noconfig" is returned. #84256 The FileSys class has a new functions to set and get a character set for file contents separate from the other charset which applies to file names. The new content charset will default to match the other CharSet value. This is particularly important for utf16 support if your application can not automatically detect utf16 content in files. #83222 The fstat command has added the following new field to OutputStat: isMapped -- set if mapped client file is synced. #82166 The ClientApi::SetVersion() method allows client applications to set a version string to be used in 'p4 monitor show -e' and server log output. #77906 To allow completely customized file handling by API-based clients, some previously non-virtual methods of the FileSys class are now virtual. The affected methods are: StrArray *ScanDir( Error *e ) void MkDir( const StrPtr &p, Error *e ) void RmDir( const StrPtr &p, Error *e ) #75604 The CharSetApi class has a new function which gives the string name of a CharSet enum value. Returns NULL if the enum value is not valid. Bugs fixed in 2005.2 #82726 (Bug #9810) Compiling Windows clients with our API using VC.Net will no longer generate compiler warnings when set to warning level 4. Now one may set "Treat warnings as errors" within VC.Net, and the API will not cause compilation to fail. ------------------------------------------------------------------------- ------------------------------------------------------------------------- Major 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 independently 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 (Bug #15933) 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 environment values. #71755 (Bug #15932) Some cases of FileSys object creation were not calling the clientUser->File method. Fixed. ------------------------------------------------------------------------- ------------------------------------------------------------------------- Major 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 suppresses 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 (Bug #14646) SetCwd(const char *) did not search for a new config file as documented and as SetCwd(StrPtr *) did. Fixed. -------------------------------------------------------------------------- -------------------------------------------------------------------------- Major 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. -------------------------------------------------------------------------- -------------------------------------------------------------------------- Major new functionality in 2003.1 #41063 New command 'p4 monitor', see relnotes.txt for details. -------------------------------------------------------------------------- -------------------------------------------------------------------------- Major 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'. -------------------------------------------------------------------------- -------------------------------------------------------------------------- Major 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'. -------------------------------------------------------------------------- -------------------------------------------------------------------------- Major 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. -------------------------------------------------------------------------- -------------------------------------------------------------------------- Major new functionality in 2000.1 #17253 Tagged output added for 'p4 logger' and 'p4 counters'. -------------------------------------------------------------------------- -------------------------------------------------------------------------- Major 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.