Release Notes for P4, the Perforce Command-Line Client, and P4D, the Perforce Server July 15, 2003 Introduction This document lists all user-visible changes to the Perforce server (P4D) and command line client (P4) between Release 97.3 and 2003.1. Release notes for P4Win, P4Web, P4WinMerge, CW Plug-in, and SCC Plug-in, as well as supplemental Platform Notes and notes on Internationalization are available separately on the Perforce Documentation web page. Perforce numbers releases YYYY.R/CCCCC, e.g. 2002.1/30547. YYYY is the year; R is the release of that year; CCCCC is the bugfix change level. Each bugfix in these release notes is marked by its change number. Any build includes (1) all bugfixes of all previous releases and (2) all bugfixes of the current release up to the bugfix change level. Both "p4" and "p4d" will report their version information by passing the "-V" flag. Additionally, "p4" can report the server's information with the "p4 info" command. -------------------------------------------------------------------------- Upgrading From Previous Releases 1. In addition to your usual checkpointing scheme, always checkpoint your server immediately before undertaking an upgrade. 2. If you are upgrading from 97.3 or earlier releases, please see the upgrade note at the end of this file. 3. The 2003.1 server will automatically upgrade 98.2 and later databases if the database contains fewer than 1000 changes. If there are 1000 or more changes, you will need to upgrade the database manually: from the server's P4ROOT directory, issue the command 'p4d -xu'. The 2003.1 depot upgrade will initialize a default depot "depot" (if required). This upgrade takes minimal time and space. The 2002.2 tempobj upgrade will only update records where the filetype is tempobj, therefore the time and space required for this upgrade will depend on your tempobj usage. THESE DATABASE UPGRADES WILL CONSUME A SIGNIFICANT AMOUNT OF SPACE, depending on which releases you are upgrading through. Check the size of the affected tables, and have available prior to upgrading three times that amount of free space (enough for a copy of the table, plus journal entries for deletes and adds). 2002.2: db.rev, db.working 2002.1: db.changes 2001.1: db.integ, db.have DOWNGRADING AFTER AN UPGRADE IS NOT POSSIBLE. (See changes 36061, 29365, 21633, and 21574.) 4. 2002.1 jobs searching supports matching punctuation, but old jobs must be reindexed with the 'p4 jobs -R' command before punctuation in those jobs will be found. (See change 27808). Interoperating With Previous Releases 1. Unless stated otherwise you can intermix any release Perforce client with any release Perforce server, but any functionality new to 2003.1 requires you to upgrade the client and/or the server. See marks in the notes below. * -- requires new p4 client program ** -- requires new p4d server program 2. Beginning with 99.2, remote depots will interoperate between UNIX and NT. Beginning with 98.2, remote depots will interoperate across (98.2 and higher) releases. In 98.1 and before, remote depots will only operate with another server of the same release. -------------------------------------------------------------------------- -------------------------------------------------------------------------- Major new functionality in 2003.1 2003.1 includes a number of as yet undocumented internal changes required for versioning and configuring of p4 specs. NEW MONITOR COMMAND DISPLAYS STATUS OF RUNNING P4 PROCESSES - #41063 ** The new 'p4 monitor' command displays the status of current running p4 processes. It is functionally similar to the UNIX 'ps' command. A perforce administrator can also use monitor to terminate long running processes. See 'p4 help monitor' for usage. (Bug #2931, #9889). Minor new functionality in 2003.1 #43840 * ** 'p4 resolve -a' of a binary file where either "yours" or "theirs" has changed from the base now does an automatic "accept theirs/yours", a conflict will still require manual selection. Interactive resolve will now suggest "at/ay" as appropriate. (Bug #5547). #39123 ** The new option 'p4d -c command' runs the command while the database tables are locked. (Bug #9887). #38864 ** 'p4 changes' has an additional option "-t" when specified will display the time as well as the date. (Bug #3224) Bugs fixed in 2003.1 #46143 ** 'p4 obliterate' would halt if it tried to unlink a lazy copy and failed because the archive was already removed. This change causes the server to issue a warning message but continue processing. #45952 ** Linux Perforce server was incorrectly reporting out of memory when close to 1GB had been consumed. (Bug #11363). #45779 ** Setting the JobStatus field on a change form would not always propagate the fix status to the included jobs. (Bug #11312). #45010 * On Windows/NT a sync "delete" action that tries to unlink a busy file fails to report the error. In addition the db.have table is incorrectly updated as if the delete actual occurred, this has been corrected. (Bug #11068). #44920 ** Some translated error messages that have been stored in perforce in a foreign language were being obscured by in-built English language versions. This has been fixed. (Bug #11173). #44136 * On Windows/NT a manual 'p4 resolve' could result in edits being lost if the target (local file) was busy during a rename operation. This change allows the user to close down the editor or whatever process is holding on to the local file and continue without losing work. (Bug #953). #43856 ** 'p4 change -o changelist#' no longer requires a valid client to be able to dump change information. (Bug #10980). #43660 ** The 97.3 (and earlier) p4win can no longer edit any form data against a 2003.1 or later server. This all but obsoletes the 97.3 p4win. #43605 * 'p4 -G job -o' with a custom jobspec that had an invalid preset (usually a value like 'set-me') failed, because the 'p4 -G' support was inadvertantly trying to validate the fields of the blank jobspec. Now 'p4 -G' doesn't validate the fields of the forms being output. #43555 ** 'p4 client' allowed the user to input a single double-quote character into the clientspec 'Root' field. This could lead to corruption of the spec requiring it to be recreated. An error is now raised to prevent this happening. (Bug #10569). #43360 ** 'p4 obliterate' no longer selects all revisions of a file when supplied with #head or #head,#head as its file revision spec. Some other commands that were not obeying #head,#head semantics correctly have also been fixed by this change. (Bug #10883). #43205 ** Access to remote depots was requiring an extra user license to enable the connection on the remote site, this has been fixed. (Bug #2128) #42761 ** The diff algorithm used internally by perforce by the various p4 diff/merge commands has been altered to provide better results when run against large text files (between 10000 and 50000 lines). (Bug #10840) #42269 ** p4d no longer holds the error log file open so that it can be renamed/moved without needing to stop the running p4d. (Bug #606) #42258 ** 'p4 client -d' has now been optimized so that during the removal of client data it no longer blocks other users. (Bug #9519). #41499 ** 'p4 sync' now completes all deletes before adding any files to a client's workspace. By performing the 'sync' in this order the amount of disk space required by the client is kept to a minimum. (Bug #607). #39841 ** 'p4 resolve' and other Perforce merge tools will no longer report as conflicting changes on adjacent lines which do not strictly overlap. This should result in fewer conflicting file merges. (Bug #3811, #7912) #38826 * On Windows/NT clients a failed 'sync' due to a file access issue (e.g. file in use) would leave the file writeable. This would cause a subsequent 'sync' to fail with the message "Can't clobber writeable file ". This has been fixed (Bug #786). #38730 ** Case-insensitive servers (Windows) could inadvertently change the case of certain entity names (e.g. client name) when referenced with a non-matching name. For example the client name 'myclient' could be changed to 'MYclient' with the following command 'p4 files ...@MYclient'. This has been fixed (Bug #9566). #38395 ** Previously installations that did not create a depot "depot" would still get a viewspec entry for one each time they created a new client. Now new installations will come initialized with this default depot which can be deleted if not required. Upgraded installations will have an entry created if necessary (i.e. there are "//depot" entries already in existence). If the installation has no reference to any "//depot" file then the depot "depot" will no longer appear in client specifications. (Bug #5960) -------------------------------------------------------------------------- -------------------------------------------------------------------------- Major new functionality in 2002.2 INTEGRATE ACROSS DISTANT BRANCHES - #35537 ** 'p4 integrate' now fully handles merging changes between branches that don't have a direct parent/child relationship. This occurs often when, say, both a release line and a development line are branched from a main line and changes must be merged directly from the development line to the release line. Previously, users had to rely on instructions in technical note #9 to ensure that the Perforce server chose the right base revision for merging. Now an updated option to 'p4 integrate' does the work. The '-I' option looks for "indirect" integration history through intermediate files when determining the base for merging. This makes it able to handle files distantly related by branching, not just those with a direct parent/child relationship. The new branch option 'indirect' implies 'p4 integrate -I' for the branch, so that it need not be passed on the command line. While it is harmless to use the '-I' flag for directly related branches, it is slower. See 'p4 help integrate' and 'p4 help resolve' for updated descriptions of their operation. (Bug #413, #9323). NEW ANNOTATE COMMAND SHOWS HISTORY OF LINES IN A FILE - #35149 ** The new 'p4 annotate' command displays the lines of a file along with the number of the revision that introduced each line. It is functionally similar to the CVS annotate command, except that it has the option to show deleted lines and note both the revision of introduction and deletion. See 'p4 help annotate' for usage. (Bug #574). SHARING CLIENTS USING MULTIPLE CLIENT ROOTS - #34879 ** Client workspaces that are shared across multiple platforms can now be better accomodated by the ability to specify multiple client roots. If the same workspace is accessed from different hosts, the same set of client workspace files can appear with a different root directory. Previously, only one root could be given in the client spec, and the user had to change it manually as he moved among platforms. Now 'p4 client' supports up to three (3) client roots, one main (named "Root") and two alternates (named "AltRoots" ). The client's current working directory is tried against all three, and the first one that matches is used. If none match, the main is used anyhow. 'p4 info' reports the applicable root. This support allows for client roots shared via multiple UNIX paths with symlinks, shared via NFS or Windows shares, or even between MacOS Classic and MacOS X. When used with the 'p4 client' LineEnd 'share' option, client workspaces can be effectively shared between UNIX and Windows. See 'p4 help client' for details on using multiple client roots. (Bug #4471, #6200, #6243, #6275, #6521, #7268) SPRUCING UP DIFFS The various commands that diff files have seen some enhancements to make them more compatible with the GNU diff and patch programs. Ignoring whitespace - #31144, #31078 * ** 'p4 diff', 'p4 diff2', 'p4 describe', and 'p4 resolve' now can ignore whitespace changes, as the GNU diff does. The -db flag ignores changes in horizontal whitespace, and the -dw flag ignores horizontal whitespace altogether. 'p4 resolve' also passes the flags to the diff option in resolve dialog. Note that 'p4 resolve' will use text from the client (aka "yours") file where the files differ only in whitespace. 'p4 diff' requires a p4 client upgrade; 'p4 diff2' and 'p4 describe' require a p4d server upgrade. 'p4 resolve' rquires both. (Bug #879, #1671, #1932). Patch-friendly output - #35143 ** 'p4 diff2 -u', which produces more patch-friendly output, is now supported. It has long been present but undocumented. (Bug #380). TEMPOBJ FILETYPE REDUX - #36061 ** The 'tempobj' filetype, which stores only the head revision of the file (to conserve space), has been reimplemented to remove some of the serious problems associated with using this filetype. It is now safe to use. Previously, the server knew there were multiple revisions but they all shared the same text. This created problems with 'p4 submit' (aborted submits would update the text anyhow), 'p4 verify' (the revision fingerprint would change), 'p4 sync' (syncing a non-head rev would still give the head rev's text), and 'p4 obliterate' (obliterating the non head rev would remove the head rev's text). Now the server associates text with each revision (just as with non-tempobj files) and goes through the extra step of purging the previous revision during 'p4 submit'. 'p4 filelog' will display non-head revisions as 'purged' and they are treated like a deleted revision: 'p4 sync' will remove the file on the client and 'p4 verify' will ignore them. With this change, the filetype modifier "+S" changes from a storage type (uncompressed binary with only the head rev stored) to a storage modifier (purge non-head revs). Any type of file (text, binary, compressed) may now take on the "+S" modifier. The filetype modifier "+M", which previously indicated compressed binary with only the head rev stored, has been supplanted by +S's new meaning. This table might make it clearer: keyword pre-2002.2 2002.2 -------- ---------- ----------- tempobj binary+Sw binary+FSw xtempobj binary+Swx binary+FSwx ctempobj binary+Mw binary+Sw +F = uncompressed +S = binary head-rev only (pre-2002.2) +S = purge non-head-revs (2002.2) +M = compressed binary head-rev only (pre-2002.2) +w = client file always writable (all tempobjs) +x = executable bit set on client The 2002.2 server will upgrade existing tempobj files to the new. This requires a database upgrade with 'p4d -xu'. (Bug #1025, #2642, #3888, #7775). NEW PROTECTION LEVEL FOR SEMI-SUPER USERS - #35832 ** A new 'p4 protect' level 'admin' has been introduced below 'super' to permit many administrative commands without granting total superuser access. The commands now requiring only 'admin' access are: p4 branch -f p4 change -f p4 client -f p4 job -f p4 jobspec p4 label -f p4 obliterate p4 typemap p4 unlock -f p4 verify The commands still requiring 'super' access are: p4 admin p4 counter -f p4 depot p4 group p4 jobs -R p4 passwd user p4 protect p4 triggers p4 user -f (Bug #3037, #1306, #2842, #3520, #5004. This change only tangentially addresses some of these bugs.) Minor new functionality in 2002.2 #36081 ** "p4 resolve" now writes its messages through the methods of the ClientUser class rather than directly to stdout to allow API users to capture and parse the output. This change is only relevant to API users. (Bug #6881.) #35972 ** 'p4 resolve' now recognizes if the resulting file has been edited to match either 'yours', 'theirs', or the automatically merged result, and changes its default suggested action appropriately. In this way, if an external merge tool produces exactly 'theirs' then 'p4 resolve' can still arrange for a lazy copy in the server. #35391 ** 'p4 describe' of a pending changelist now includes the affected files. This fixes our oldest open bug. (Bug #13, #4974). #35390 ** The new option 'p4 revert -n' just displays which files would be reverted without actually reverting them. #35368 ** Long running operations that have been cancelled by the client can now be detected and terminated in the server. This feature may not be available on all platforms. (Bug #409). #35145 ** The new options 'p4 files -a' and 'p4 print -a' display all revisions in a revision range, rather than just the highest revision. #35114 ** 'p4 filelog' has an additional option "-t" when specified will display the time as well as the date. (Bug #553). #35063 * Adding support for Mac OS Roman character set in i18n mode. To use, set P4CHARSET to "macosroman". #34972 ** p4 info now displays the offset from UTC of the server timezone numerically and with a symbol if the symbol supplied from the OS is ASCII. (Bug #9359). Bugs fixed since 2002.2/39491 (first release). #43923 ** The proxy's RCS based cache files could be corrupted if concurrent updates to that RCS file occurred due to multiple clients requesting a revision from that file. Fixed. Related, the executable bit will no longer be set on RCS files. Also related, RCS anomolies if one client is used concurrently by multiple processes to submit the same file. (Bug #6054 & #10512) #42711 ** A 3 way merge during a resolve of large files (>20000 lines) could cause the server to crash, this has been fixed. (Bug #10835). #42453 ** Prior to 2002.2 there was a bug that under certain conditions allowed a lazy copy of a tempobj archive file. In 2002.2 the new tempobj implementation purges old copies (,t) files replacing them with the appropriate base type. A 2002.2 user can run into a problem if they try and access one of the branched files that have (since 2002.2 upgrade) had the base file for the lazy copy purged. This fix prevents old tempobj files (,t) from being removed during a submit although they will still be marked as "purged" in the rev table. When trying to access a file that had been purged as previously stated the user would receive an error something like this: Librarian checkout depot/branch/foo.c failed. open for read: depot/branch/foo.c,t: The system cannot find the file specified Even if this fix has been applied it is still possible to get the above error message if the base file was purged before this version was installed (in a previous 2002.2 release). If this happens the file can be manually fixed up, for help on this please contact technical support. (Bug #10581). #41819 ** Due to the sometimes significant overhead of indirect integration, 'p4 integ -i' has been reverted to its previous use of just allowing baseless merges. A new option 'p4 integ -I' is required to use the new 2002.2 feature to find intermediate files when determining a base. (Bug #10587). #41516 ** 'p4 print -o' through the proxy might fail silently depending on network timing. Fixed. (Bugs #10491, #10511, #10574) #41173 ** 'p4 verify' could crash the server if it ran out of available memory. (Bug #10468). #41169 ** Long running operations that have been cancelled by clients running on NT were not detected on an NT server. Fixed (Bug #10465). #41147 ** 'p4 sync' through the proxy was not honoring a client's 'allwrite' option if files were delivered from the proxy. Fixed. (Bug #10398) #40318 * 'p4 revert' of a file with the client option "modTime" set under certain circumstances could lead to the error: ("utime: filepath: Access is denied.") This problem has been fixed. (Bug #10202). #40313 * 'p4 resolve' when prompted for a "confirm accept (y/n)" would incorrectly throw up two messages if the user answered in the negative "n". This would be very confusing and has been fixed (Bug #10212). #40216 ** Certain p4 commands with a "filepath@label" argument could cause a unnecessary scan of the label table. This would occur if the filepath supplied did not contain any file revisions. This problem has been fixed. (Bug #10204). #40122 ** Trying to integrate from the new tempobj type would result in the incorrect warning message "can't branch without -d flag". This problem has been fixed. (Bug #10166). #39934 ** On NT servers, under certain conditions an internal file rename operation could fail. A retry has been added to this part of the code and extra diagnostics have been enabled to log relevant information in an attempt to track down this problem. Bugs fixed in 2002.2 #38452 ** p4d sometimes core dumped on shutdown on hpux11 PA-RISC machines. This has been fixed. (Bug #9641) #38559 * The "share" client line-end option has been extended to include support for Mac files that use linefeeds as their line terminator. (Bug #9068). #37237 ** p4d -xv and p4d -xr did not recongnize or correct btree corruption where a btree page's first few bytes had been corrupted. This case should now be handled properly. (Bug #9501). #37746 ** 'p4 integrate -i' was "giving credit" for indirect integrations that hadn't necessarily affected the target file, suppressing proper integrations from happening. This has been fixed. (Bug #9573). #37236 * Client programs running in timezones east of GMT sometimes miscalculated their GMT offset, resulting in incorrect modtimes on submitted and sync files. This has been corrected. This fix does not attempt to fix the modtimes of files previously submitted with the wrong modtime. (Bug #9503). #36747 * Clients on OSF incorrectly offset file modtimes by one day: submits were one day into the future and syncs would be one day into the past. This problem would only become evident if you also operated with other, non-OSF clients. The OSF clients now set file modtimes correctly. (Bug #9212). #36584 * On Cygwin the p4 client program would exit (quickly) if the 'rmdir' client option was set when a file was removed from the current directory (either through 'p4 sync' or 'p4 delete'). This has been corrected with an internal workaround. (Bug #7478, #7543). #36150 * 'p4 revert -a' wasn't resetting the modification time for a file when the client had the option 'modtime' set. This has been fixed. (Bug #8978). #35946 ** 'p4 obliterate -z' without the '-y' (make the changes) now only reports what it would do. It used say it was in report mode, but then actually undo lazy copies. Now '-y' is required for 'p4 obliterate -z' to take effect. (Bug #3613). #35869 ** 'p4 diff2 @label1 @label2' would issue a bogus error message ("RelateMap has empty maps!"). This has been fixed. (Bug #1382). #35829 ** Some server errors that occur before protocol initialization (like being unable to open the database) could result in a bogus error message ("Required parameter 'func' not set!") sent to the client. This has been fixed. (Bug #8110). #35799 ** Using p4d -xi to enable I18N mode would sometimes incorrectly fail reporting non-UTF8 data in either the db.job or db.change table. This has been corrected. (Bug #9011). #35738 ** 'p4 changes -s pending' is not compatible with a file argument as it will always return no data (since only submitted change information is available in the rev table). Supplying a file argument has now been disallowed to avoid any confusion. (Bug #371). #35403 ** 'p4 job -f' would not allow an update of read-only "once" fields. This has been corrected. (Bug #5938, #8111). #35274 ** To speed p4win, performance of 'p4 changes -m1 filepath' has been specially optimized. This only speeds this exact command: filepaths including @client and @label will not be affected by this change. (Bug #7306). #34362 ** The internal support for optimizing p4win's performance against large servers (see #29329 below) sometimes didn't work with the case-insensitive (Windows) Perforce server. This has been corrected. (Bug #8404). #34284 ** 'p4 edit ' where the number of files is greater than the value set for "maxscanrows" would result in an incorrect error message being returned. This has been corrected. (Bug #7837). #34069 ** A new error message indicates attempted access by a user not enabled at all via 'p4 protect'. Previously, it was not possible to tell if a user had no access at all or just no access for the requested command. #33552 ** 'p4 filelog @