VC Expects the backend to report that the status is ‘needs-update’, not
‘needs-patch’. I don’t know if this has changed over the years, but this is what
it needs now.
- The arguments ‘comment’ and ‘rev’ have been switched. I don’t know if this
used to be different from how it is now, but ‘rev’ comes last now and is
optional.
- The ‘vc-p4-client’ needs to be collected from the first file in the list of
files to check in because ‘vc-p4-checkin’ is called from a different buffer
that isn’t in the same directory.
- ‘vc-p4-client’ also needs to be stored under a different name so that when it
changes to the ‘*p4-lowlevel-changes*’ buffer it doesn’t clear the value.
- Instead of inserting the specified comment directly, send it through
‘log-edit-extract-headers’ which removes the "Summary: " header that
‘vc-log-edit’ adds.
- Indent rigidly to ‘tab-width’ instead of 8. Indenting to 8 added too many tabs
to the description and caused all lines to be prefixed by a tab.
- Add command ‘vc-p4-logged-in-p’ to check if the user is currently logged in.
- Add command ‘vc-p4-login’ to log in if the user isn’t already logged in.
- Add better error reporting for the situation where a user isn’t logged in.
Quoting the string with Windows paths in it would double-quote the directory
separators. It also seems easier to use ‘string-prefix-p’ than an anchored
regular expression.
‘alist-get’ is a function that was introduced in Emacs 25 that is easier to use
than ‘assoc’ + ‘cdr’.
Unfortunately I did not document the changes as I made them. I have been able to determine the purpose of most of the changes by code inspection but there are a few changes for which I have not been able to determine a purpose.
* Modifications to support XEmacs.
* Added the p4-lowlevel-locate-p4 function. This function is used to locate the p4 executable on the exec-path. It is used by the vc-p4-registered function to avoid an error on systems on which the Perforce client is not installed. This is useful if the same .emacs file is used on multiple systems, some of which do not have the Perforce client installed.
* Modified the p4-lowlevel-successful-alist-p function so that a command that returns the message "file(s) up-to-date" does not trigger an error. As part of this change I added the p4-lowlevel-ignore-error-list defcustom and the p4-lowlevel-should-ignore-error function.
* Modified the vc-p4-registered function so that it uses the p4-lowlevel-locate-p4 function to verify that the Perforce client is installed.
[git-p4: depot-paths = "//guest/Ben_Key/vc-p4/,//guest/jonathan_kamens/vc-p4/,//guest/magnus_henoch/vc-p4/": change = 12013]
single request to the server in the simplest case (diff edited
file to synced version).
* p4-lowlevel.el (p4-lowlevel-command-into-buffer): Don't reorder
info and text lines.
(p4-lowlevel-diff): Support lists of files as well as a single file.
[git-p4: depot-paths = "//guest/Ben_Key/vc-p4/,//guest/jonathan_kamens/vc-p4/,//guest/magnus_henoch/vc-p4/": change = 7484]
file inside Perforce working directory. Still gives incorrect
'up-to-date' status in vc-dir sometimes.
[git-p4: depot-paths = "//guest/Ben_Key/vc-p4/,//guest/jonathan_kamens/vc-p4/,//guest/magnus_henoch/vc-p4/": change = 7377]
nor in depot head as `up-to-date'.
[git-p4: depot-paths = "//guest/Ben_Key/vc-p4/,//guest/jonathan_kamens/vc-p4/,//guest/magnus_henoch/vc-p4/": change = 7362]