Improve documentation and UI of 'C-x v L'

* lisp/vc/vc.el (vc-print-root-log): Improve the wording of
the doc string and of the prompt for the root directory.

* etc/NEWS: Improve and expand the wording of the changes in
'C-x v L'.

* doc/emacs/maintaining.texi (VC Change Log): Improve and
clarify wording of the 'C-x v L' description.
This commit is contained in:
Eli Zaretskii 2019-11-29 11:03:55 +02:00
parent b2790db049
commit 6e41b08ea8
3 changed files with 19 additions and 7 deletions

View file

@ -993,8 +993,14 @@ version-controlled directory tree (RCS, SCCS, CVS, and SRC do not
support this feature). With a prefix argument, the command prompts
for the maximum number of revisions to display. A numeric prefix
argument specifies the maximum number of revisions without prompting.
When the numeric prefix argument is @kbd{M-1}, the command prompts
for the revision ID, and displays its log entry with a diff of changes.
When the numeric prefix argument is 1, as in @w{@kbd{C-1 C-x v L}} or
@w{@kbd{C-u 1 C-x v L}}, the command prompts for the revision ID, and
displays the log entry of that revision together with the changes
(diffs) it introduced. (Some less capable version control systems,
such as RCS and CVS, don't have commands to show a revision log with
its diffs; for them the command displays only the log entry, and you
can request to show the diffs by typing @kbd{d} or @kbd{D}, see
below.)
The @kbd{C-x v L} history is shown in a compact form, usually
showing only the first line of each log entry. However, you can type

View file

@ -998,7 +998,12 @@ With a prefix argument asks for a command, so for example,
just one log entry found by its revision number.
+++
*** 'C-1 C-x v L' asks for a revision and shows its log entry with diff.
*** It is now possible to display a specific revision given by its ID.
If you invoke 'C-x v L' ('vc-print-root-log') with a numeric argument
of 1, as in 'C-1 C-x v L' or 'C-u 1 C-x v L', it asks for a revision
ID, and shows its log entry together with the diffs introduced by the
revision's commit. (For some less capable VCSes, only the log entry
is shown.)
*** 'C-x v =' can now mimic Magit's diff format.
Set the new user option 'diff-font-lock-prettify' to t for that, see

View file

@ -2481,13 +2481,14 @@ WORKING-REVISION and LIMIT."
;;;###autoload
(defun vc-print-root-log (&optional limit revision)
"List the change log for the current VC controlled tree in a window.
"List the revision history for the current VC controlled tree in a window.
If LIMIT is non-nil, it should be a number specifying the maximum
number of revisions to show; the default is `vc-log-show-limit'.
When called interactively with a prefix argument, prompt for LIMIT.
When the prefix argument is a number, use it as LIMIT.
A special case is when the prefix argument is 1, in this case
it asks for the revision and shows it with its diff."
A special case is when the prefix argument is 1: in this case
the command asks for the ID of a revision, and shows that revision
with its diffs (if the underlying VCS supports that)."
(interactive
(cond
((eq current-prefix-arg 1)
@ -2517,7 +2518,7 @@ it asks for the revision and shows it with its diff."
rootdir)
(if backend
(setq rootdir (vc-call-backend backend 'root default-directory))
(setq rootdir (read-directory-name "Directory for VC root-log: "))
(setq rootdir (read-directory-name "Directory for VC revision log: "))
(setq backend (vc-responsible-backend rootdir))
(unless backend
(error "Directory is not version controlled")))