Commit graph

34 commits

Author SHA1 Message Date
99ca65c5cb Change the visited file name of the renamed file's buffer
If ‘p4-vc-rename-file’ is used and the file that's been renamed is open in a
buffer, change that buffer's visited file name so that when you switch to it and
start editing it, it doesn't save to the original file and your modifications
will have to be moved over.
2022-03-02 20:23:04 -08:00
905e88a1bd
Remove ‘vc-p4-client’
When I wrote this feature I didn’t realize that this functionality is already
built into Perforce itself. By using the ‘P4CONFIG’ variable you can specify the
name of a file that ‘p4’ will look for that can specify the client (among
others) for that directory and all subdirectories.
2021-09-08 00:12:03 -07:00
a4c79a8ea3 Fix some warnings 2021-02-27 15:12:12 -08:00
dcb212c410 Fix as many as possible checkdoc issues 2021-02-27 14:09:44 -08:00
48237437e8 Add ‘vc-p4-rename’
In Perforce renaming and deleting and creating files are different things. In
the latter situation any history is lost.
2021-02-24 22:17:00 -08:00
7af739cc7d Add client argument to ‘vc-p4-delete’ 2021-01-23 10:34:05 -08:00
a9bf4c10ad Add client arg to ‘vc-p4-update-changelog’ 2021-01-23 10:30:34 -08:00
7726d77a94 Add client argument to ‘vc-p4-print-log’ 2021-01-23 10:25:34 -08:00
ed30884133 Add client argument to ‘vc-p4-steal-lock’ 2021-01-23 10:19:13 -08:00
8c75982f01 Add client argument for merging files 2021-01-23 10:01:21 -08:00
5c39509421 Add client argument for checking in files 2021-01-23 09:50:29 -08:00
553914a5ac Fix using client for registering new files 2021-01-23 09:39:24 -08:00
b95132e71e Add client arguments for ‘p4 add’ 2021-01-23 09:34:20 -08:00
a535c47e93 Make ‘vc-revert’ work with the current client 2021-01-22 21:58:40 -08:00
a60278efa7 Make checking out files with a client work 2021-01-22 21:35:20 -08:00
2b270a93f0 Add client argument to ‘p4-lowlevel-revert’ 2021-01-21 23:13:18 -08:00
6724d2b827 Specify client for initial responsibility check 2021-01-21 19:15:08 -08:00
4c5fc58d6d Enable lexical binding for project files 2021-01-14 23:12:30 -08:00
23bacc0d4b Add login commands
- 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.
2021-01-14 22:39:21 -08:00
35beacc3d6 Fix indentation of comments, reflow 2020-05-13 11:29:35 -07:00
749665a8ae Add support for the vc-delete command 2020-05-13 11:07:38 -07:00
774ab55e9e Add simplistic vc-p4-switch-client command 2020-03-02 21:08:23 -08:00
e7a25a4fda Fix whitespace 2017-06-07 00:03:49 -07:00
Ben_Key
3cb296d970 Various modifications to vc-p4 that I have been using for years.
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]
2015-03-10 14:43:47 -08:00
Magnus Henoch
a0e7fbe5e1 * vc-p4.el (vc-p4-print-log): Accept optional arguments shortlog
and limit, as required by Emacs 23.1.50.

* p4-lowlevel.el (p4-lowlevel-filelog): Accept limit argument.

[git-p4: depot-paths = "//guest/Ben_Key/vc-p4/,//guest/jonathan_kamens/vc-p4/,//guest/magnus_henoch/vc-p4/": change = 7487]
2009-11-17 16:35:08 -08:00
Magnus Henoch
4667f79c0a * vc-p4.el (vc-p4-diff): Support lists of files. Perform only a
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]
2009-11-16 12:56:58 -08:00
Magnus Henoch
5305e9d39e * p4-lowlevel.el (p4-lowlevel-diff): Remove slash from directory name if needed.
[git-p4: depot-paths = "//guest/Ben_Key/vc-p4/,//guest/jonathan_kamens/vc-p4/,//guest/magnus_henoch/vc-p4/": change = 7388]
2009-09-16 08:03:08 -08:00
Magnus Henoch
5051f6e818 * p4-lowlevel.el (p4-lowlevel-buffer-to-alist): Strip CR from end
of line.

[git-p4: depot-paths = "//guest/Ben_Key/vc-p4/,//guest/jonathan_kamens/vc-p4/,//guest/magnus_henoch/vc-p4/": change = 7331]
2009-07-20 15:37:50 -08:00
Magnus Henoch
5c078b4c12 (p4-lowlevel-diff): Handle diff of directories.
[git-p4: depot-paths = "//guest/Ben_Key/vc-p4/,//guest/jonathan_kamens/vc-p4/,//guest/magnus_henoch/vc-p4/": change = 7233]
2009-05-27 06:08:50 -08:00
Magnus Henoch
b52aaa3e2c Update copyright notices. Update URL; include URL of previous version.
[git-p4: depot-paths = "//guest/Ben_Key/vc-p4/,//guest/jonathan_kamens/vc-p4/,//guest/magnus_henoch/vc-p4/": change = 7231]
2009-05-27 03:11:58 -08:00
Jonathan Kamens
6afc1e6c47 Changes from Dan Nicolaescu:
For vc-p4.el:
- delete a few more vc functions that are identical in emacs
- delete now unused vc-p4-change-times
- make vc-p4-annotate-command default to the internal elisp code
- delete vc-p4-state-heuristic, it's the same as the default
- new function vc-p4-find-version
- make a few functions cope with emacs-23 (not released yet),
  that changes the first argument from FILE to FILE_LIST
- add an internal implementation for vc-annotate, simplify the
  annotate code

For p4-lowlevel.el: 
- fail graciously when offline and trying to access a file that
  is under perforce

[git-p4: depot-paths = "//guest/Ben_Key/vc-p4/,//guest/jonathan_kamens/vc-p4/,//guest/magnus_henoch/vc-p4/": change = 5999]
2007-08-01 18:27:55 -08:00
Jonathan Kamens
550739981d Minor bug fixes from Dan Nicolaescu <dann@ics.uci.edu>.
[git-p4: depot-paths = "//guest/Ben_Key/vc-p4/,//guest/jonathan_kamens/vc-p4/,//guest/magnus_henoch/vc-p4/": change = 5986]
2007-07-18 12:14:09 -08:00
Jonathan Kamens
5206f5e427 Add comments telling people where these files can be retrieved
from.

[git-p4: depot-paths = "//guest/Ben_Key/vc-p4/,//guest/jonathan_kamens/vc-p4/,//guest/magnus_henoch/vc-p4/": change = 1214]
2002-01-05 19:55:28 -08:00
Jonathan Kamens
b69b02ad08 Initial version of Emacs 21 VC support for Perforce.
[git-p4: depot-paths = "//guest/Ben_Key/vc-p4/,//guest/jonathan_kamens/vc-p4/,//guest/magnus_henoch/vc-p4/": change = 1213]
2002-01-05 19:45:11 -08:00