summaryrefslogtreecommitdiff
path: root/lisp/vc
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/vc')
-rw-r--r--lisp/vc/add-log.el6
-rw-r--r--lisp/vc/cvs-status.el2
-rw-r--r--lisp/vc/diff-mode.el2
-rw-r--r--lisp/vc/ediff-diff.el18
-rw-r--r--lisp/vc/ediff-init.el2
-rw-r--r--lisp/vc/emerge.el4
-rw-r--r--lisp/vc/log-edit.el2
-rw-r--r--lisp/vc/pcvs-defs.el10
-rw-r--r--lisp/vc/vc-annotate.el28
-rw-r--r--lisp/vc/vc-bzr.el122
10 files changed, 92 insertions, 104 deletions
diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el
index be7bba54378..b9c3d0d385a 100644
--- a/lisp/vc/add-log.el
+++ b/lisp/vc/add-log.el
@@ -1122,17 +1122,17 @@ parentheses."
;;;###autoload
(defvar add-log-lisp-like-modes
'(emacs-lisp-mode lisp-mode scheme-mode dsssl-mode lisp-interaction-mode)
- "*Modes that look like Lisp to `add-log-current-defun'.")
+ "Modes that look like Lisp to `add-log-current-defun'.")
;;;###autoload
(defvar add-log-c-like-modes
'(c-mode c++-mode c++-c-mode objc-mode)
- "*Modes that look like C to `add-log-current-defun'.")
+ "Modes that look like C to `add-log-current-defun'.")
;;;###autoload
(defvar add-log-tex-like-modes
'(TeX-mode plain-TeX-mode LaTeX-mode tex-mode)
- "*Modes that look like TeX to `add-log-current-defun'.")
+ "Modes that look like TeX to `add-log-current-defun'.")
(declare-function c-cpp-define-name "cc-cmds" ())
(declare-function c-defun-name "cc-cmds" ())
diff --git a/lisp/vc/cvs-status.el b/lisp/vc/cvs-status.el
index a80197486a2..f803cc43441 100644
--- a/lisp/vc/cvs-status.el
+++ b/lisp/vc/cvs-status.el
@@ -395,7 +395,7 @@ the list is a three-string list TAG, KIND, REV."
(cvs-tree-use-jisx0208 'jisx0208)
((char-displayable-p ?━) 'unicode)
((char-displayable-p (make-char 'japanese-jisx0208 40 44)) 'jisx0208))
- "*Non-nil if we should use the graphical glyphs from `japanese-jisx0208'.
+ "Non-nil if we should use the graphical glyphs from `japanese-jisx0208'.
Otherwise, default to ASCII chars like +, - and |.")
(defconst cvs-tree-char-space
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 16e33889c31..8b6b85dd22e 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -545,7 +545,7 @@ but in the file header instead, in which case move forward to the first hunk."
(condition-case-unless-debug nil (diff-refine-hunk) (error nil))))
(easy-mmode-define-navigation
- diff-file diff-file-header-re "file" diff-end-of-hunk)
+ diff-file diff-file-header-re "file" diff-end-of-file)
(defun diff-restrict-view (&optional arg)
"Restrict the view to the current hunk.
diff --git a/lisp/vc/ediff-diff.el b/lisp/vc/ediff-diff.el
index 37b7fce6f32..6d67356852c 100644
--- a/lisp/vc/ediff-diff.el
+++ b/lisp/vc/ediff-diff.el
@@ -101,7 +101,7 @@ the command \\[ediff-show-diff-output]. Use the variable
:group 'ediff-diff)
(ediff-defvar-local ediff-ignore-case nil
- "*If t, skip over difference regions that differ only in letter case.
+ "If t, skip over difference regions that differ only in letter case.
This variable can be set either in .emacs or toggled interactively.
Use `setq-default' if setting it in .emacs")
@@ -165,12 +165,12 @@ This variable can be set either in .emacs or toggled interactively.
Use `setq-default' if setting it in .emacs")
(ediff-defvar-local ediff-ignore-similar-regions nil
- "*If t, skip over difference regions that differ only in the white space and line breaks.
+ "If t, skip over difference regions that differ only in the white space and line breaks.
This variable can be set either in .emacs or toggled interactively.
Use `setq-default' if setting it in .emacs")
(ediff-defvar-local ediff-auto-refine-limit 14000
- "*Auto-refine only the regions of this size \(in bytes\) or less.")
+ "Auto-refine only the regions of this size \(in bytes\) or less.")
;;; General
@@ -1288,38 +1288,38 @@ delimiter regions"))
;;; Word functions used to refine the current diff
(defvar ediff-forward-word-function 'ediff-forward-word
- "*Function to call to move to the next word.
+ "Function to call to move to the next word.
Used for splitting difference regions into individual words.")
(make-variable-buffer-local 'ediff-forward-word-function)
;; \240 is Unicode symbol for nonbreakable whitespace
(defvar ediff-whitespace " \n\t\f\r\240"
- "*Characters constituting white space.
+ "Characters constituting white space.
These characters are ignored when differing regions are split into words.")
(make-variable-buffer-local 'ediff-whitespace)
(defvar ediff-word-1
(if (featurep 'xemacs) "a-zA-Z---_" "-[:word:]_")
- "*Characters that constitute words of type 1.
+ "Characters that constitute words of type 1.
More precisely, [ediff-word-1] is a regexp that matches type 1 words.
See `ediff-forward-word' for more details.")
(make-variable-buffer-local 'ediff-word-1)
(defvar ediff-word-2 "0-9.,"
- "*Characters that constitute words of type 2.
+ "Characters that constitute words of type 2.
More precisely, [ediff-word-2] is a regexp that matches type 2 words.
See `ediff-forward-word' for more details.")
(make-variable-buffer-local 'ediff-word-2)
(defvar ediff-word-3 "`'?!:;\"{}[]()"
- "*Characters that constitute words of type 3.
+ "Characters that constitute words of type 3.
More precisely, [ediff-word-3] is a regexp that matches type 3 words.
See `ediff-forward-word' for more details.")
(make-variable-buffer-local 'ediff-word-3)
(defvar ediff-word-4
(concat "^" ediff-word-1 ediff-word-2 ediff-word-3 ediff-whitespace)
- "*Characters that constitute words of type 4.
+ "Characters that constitute words of type 4.
More precisely, [ediff-word-4] is a regexp that matches type 4 words.
See `ediff-forward-word' for more details.")
(make-variable-buffer-local 'ediff-word-4)
diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el
index 2de5e4dbdaf..ad6d69ee924 100644
--- a/lisp/vc/ediff-init.el
+++ b/lisp/vc/ediff-init.el
@@ -594,7 +594,7 @@ highlighted using ASCII flags."
(ediff-defvar-local ediff-start-narrowed t
"Non-nil means start narrowed, if doing ediff-windows-* or ediff-regions-*")
(ediff-defvar-local ediff-quit-widened t
- "*Non-nil means: when finished, Ediff widens buffers A/B.
+ "Non-nil means: when finished, Ediff widens buffers A/B.
Actually, Ediff restores the scope of visibility that existed at startup.")
(defcustom ediff-keep-variants t
diff --git a/lisp/vc/emerge.el b/lisp/vc/emerge.el
index a48f2afecd5..f6942bc538d 100644
--- a/lisp/vc/emerge.el
+++ b/lisp/vc/emerge.el
@@ -524,10 +524,10 @@ replaced by emerge-fast-keymap.")
(emerge-defvar-local emerge-old-keymap nil
"The original local keymap for the merge buffer.")
(emerge-defvar-local emerge-auto-advance nil
- "*If non-nil, emerge-select-A and emerge-select-B automatically advance to
+ "If non-nil, emerge-select-A and emerge-select-B automatically advance to
the next difference.")
(emerge-defvar-local emerge-skip-prefers nil
- "*If non-nil, differences for which there is a preference are automatically
+ "If non-nil, differences for which there is a preference are automatically
skipped.")
(emerge-defvar-local emerge-quit-hook nil
"Hooks to run in the merge buffer after the merge has been finished.
diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el
index 54d548c09da..db70f417393 100644
--- a/lisp/vc/log-edit.el
+++ b/lisp/vc/log-edit.el
@@ -161,7 +161,7 @@ can be obtained from `log-edit-files'."
"21.1")
(defvar log-edit-changelog-full-paragraphs cvs-changelog-full-paragraphs
- "*If non-nil, include full ChangeLog paragraphs in the log.
+ "If non-nil, include full ChangeLog paragraphs in the log.
This may be set in the ``local variables'' section of a ChangeLog, to
indicate the policy for that ChangeLog.
diff --git a/lisp/vc/pcvs-defs.el b/lisp/vc/pcvs-defs.el
index 80a01f58531..ab45b313bd5 100644
--- a/lisp/vc/pcvs-defs.el
+++ b/lisp/vc/pcvs-defs.el
@@ -33,7 +33,7 @@
;;;; START OF THINGS TO CHECK WHEN INSTALLING
(defvar cvs-program "cvs"
- "*Name or full path of the cvs executable.")
+ "Name or full path of the cvs executable.")
(defvar cvs-version
;; With the divergence of the CVSNT codebase and version numbers, this is
@@ -46,12 +46,12 @@
nil t)
(cons (string-to-number (match-string 1))
(string-to-number (match-string 2))))))
- "*Version of `cvs' installed on your system.
+ "Version of `cvs' installed on your system.
It must be in the (MAJOR . MINOR) format.")
;; FIXME: this is only used by cvs-mode-diff-backup
(defvar cvs-diff-program (or (and (boundp 'diff-command) diff-command) "diff")
- "*Name or full path of the best diff program you've got.
+ "Name or full path of the best diff program you've got.
NOTE: there are some nasty bugs in the context diff variants of some vendor
versions, such as the one in SunOS-4.")
@@ -89,7 +89,7 @@ will select a shared-flag.")
"List of flags whose settings is shared among several commands.")
(defvar cvs-cvsroot nil
- "*Specifies where the (current) cvs master repository is.
+ "Specifies where the (current) cvs master repository is.
Overrides the environment variable $CVSROOT by sending \" -d dir\" to
all CVS commands. This switch is useful if you have multiple CVS
repositories. It can be set interactively with \\[cvs-change-cvsroot.]
@@ -243,7 +243,7 @@ the directory name of the cvs buffer.")
;; Was '(expand-file-name " *cvs-tmp*" dir), but that causes them to
;; become non-hidden if uniquification is done `forward'.
" *cvs-tmp*"
- "*Name of the cvs temporary buffer.
+ "Name of the cvs temporary buffer.
Output from cvs is placed here for asynchronous commands.")
(defcustom cvs-idiff-imerge-handlers
diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el
index a1dd807d828..f4964ef85cc 100644
--- a/lisp/vc/vc-annotate.el
+++ b/lisp/vc/vc-annotate.el
@@ -522,12 +522,12 @@ the file in question, search for the log entry required and move point."
(car rev-at-line) t 1)))))))
(defun vc-annotate-show-diff-revision-at-line-internal (filediff)
- (if (not (equal major-mode 'vc-annotate-mode))
+ (if (not (derived-mode-p 'vc-annotate-mode))
(message "Cannot be invoked outside of a vc annotate buffer")
(let* ((rev-at-line (vc-annotate-extract-revision-at-line))
- (prev-rev nil)
- (rev (car rev-at-line))
- (fname (cdr rev-at-line)))
+ (prev-rev nil)
+ (rev (car rev-at-line))
+ (fname (cdr rev-at-line)))
(if (not rev-at-line)
(message "Cannot extract revision number from the current line")
(setq prev-rev
@@ -535,17 +535,15 @@ the file in question, search for the log entry required and move point."
(if filediff fname nil) rev))
(if (not prev-rev)
(message "Cannot diff from any revision prior to %s" rev)
- (save-window-excursion
- (vc-diff-internal
- nil
- ;; The value passed here should follow what
- ;; `vc-deduce-fileset' returns.
- (list vc-annotate-backend
- (if filediff
- (list fname)
- nil))
- prev-rev rev))
- (switch-to-buffer "*vc-diff*"))))))
+ (vc-diff-internal
+ t
+ ;; The value passed here should follow what
+ ;; `vc-deduce-fileset' returns.
+ (list vc-annotate-backend
+ (if filediff
+ (list fname)
+ nil))
+ prev-rev rev))))))
(defun vc-annotate-show-diff-revision-at-line ()
"Visit the diff of the revision at line from its previous revision."
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index 798131236d5..505e40f46ba 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -37,7 +37,6 @@
;; are bzr-versioned, `vc-bzr` presently runs `bzr status` on the
;; symlink, thereby not detecting whether the actual contents
;; (that is, the target contents) are changed.
-;; See https://bugs.launchpad.net/vc-bzr/+bug/116607
;;; Properties of the backend
@@ -65,14 +64,6 @@
:group 'vc-bzr
:type 'string)
-(defcustom vc-bzr-sha1-program '("sha1sum")
- "Name of program to compute SHA1.
-It must be a string \(program name\) or list of strings \(name and its args\)."
- :type '(repeat string)
- :group 'vc-bzr)
-
-(define-obsolete-variable-alias 'sha1-program 'vc-bzr-sha1-program "24.1")
-
(defcustom vc-bzr-diff-switches nil
"String or list of strings specifying switches for bzr diff under VC.
If nil, use the value of `vc-diff-switches'. If t, use no switches."
@@ -190,20 +181,15 @@ in the repository root directory of FILE."
(defun vc-bzr-sha1 (file)
(with-temp-buffer
(set-buffer-multibyte nil)
- (let ((prog vc-bzr-sha1-program)
- (args nil)
- process-file-side-effects)
- (when (consp prog)
- (setq args (cdr prog))
- (setq prog (car prog)))
- (apply 'process-file prog (file-relative-name file) t nil args)
- (buffer-substring (point-min) (+ (point-min) 40)))))
+ (insert-file-contents-literally file)
+ (sha1 (current-buffer))))
(defun vc-bzr-state-heuristic (file)
"Like `vc-bzr-state' but hopefully without running Bzr."
- ;; `bzr status' was excruciatingly slow with large histories and
- ;; pending merges, so try to avoid using it until they fix their
- ;; performance problems.
+ ;; `bzr status' could be slow with large histories and pending merges,
+ ;; so this tries to avoid calling it if possible. bzr status is
+ ;; faster now, so this is not as important as it was.
+ ;;
;; This function tries first to parse Bzr internal file
;; `checkout/dirstate', but it may fail if Bzr internal file format
;; has changed. As a safeguard, the `checkout/dirstate' file is
@@ -299,10 +285,7 @@ in the repository root directory of FILE."
'up-to-date)
(t 'edited))
'unregistered))))
- ;; Either the dirstate file can't be read, or the sha1
- ;; executable is missing, or ...
- ;; In either case, recent versions of Bzr aren't that slow
- ;; any more.
+ ;; The dirstate file can't be read, or some other problem.
(error (vc-bzr-state file)))))))
@@ -417,49 +400,56 @@ string or nil, and STATUS is one of the symbols: `added',
`ignored', `kindchanged', `modified', `removed', `renamed', `unknown',
which directly correspond to `bzr status' output, or 'unchanged
for files whose copy in the working tree is identical to the one
-in the branch repository, or nil for files that are not
-registered with Bzr.
-
-If any error occurred in running `bzr status', then return nil."
+in the branch repository (or whose status not be determined)."
+;; Doc used to also say the following, but AFAICS, it has never been true.
+;;
+;; ", or nil for files that are not registered with Bzr.
+;; If any error occurred in running `bzr status', then return nil."
+;;
+;; Rather than returning nil in case of an error, it returns
+;; (unchanged . WARNING). FIXME unchanged is not the best status to
+;; return in case of error.
(with-temp-buffer
- (let ((ret (condition-case nil
- (vc-bzr-command "status" t 0 file)
- (file-error nil))) ; vc-bzr-program not found.
- (status 'unchanged))
- ;; the only secure status indication in `bzr status' output
- ;; is a couple of lines following the pattern::
- ;; | <status>:
- ;; | <file name>
- ;; if the file is up-to-date, we get no status report from `bzr',
- ;; so if the regexp search for the above pattern fails, we consider
- ;; the file to be up-to-date.
- (goto-char (point-min))
- (when (re-search-forward
- ;; bzr prints paths relative to the repository root.
- (concat "^\\(" vc-bzr-state-words "\\):[ \t\n]+"
- (regexp-quote (vc-bzr-file-name-relative file))
- ;; Bzr appends a '/' to directory names and
- ;; '*' to executable files
- (if (file-directory-p file) "/?" "\\*?")
- "[ \t\n]*$")
- nil t)
- (lexical-let ((statusword (match-string 1)))
- ;; Erase the status text that matched.
- (delete-region (match-beginning 0) (match-end 0))
- (setq status
- (intern (replace-regexp-in-string " " "" statusword)))))
- (when status
- (goto-char (point-min))
- (skip-chars-forward " \n\t") ;Throw away spaces.
- (cons status
- ;; "bzr" will output warnings and informational messages to
- ;; stderr; due to Emacs's `vc-do-command' (and, it seems,
- ;; `start-process' itself) limitations, we cannot catch stderr
- ;; and stdout into different buffers. So, if there's anything
- ;; left in the buffer after removing the above status
- ;; keywords, let us just presume that any other message from
- ;; "bzr" is a user warning, and display it.
- (unless (eobp) (buffer-substring (point) (point-max))))))))
+ ;; This is with-demoted-errors without the condition-case-unless-debug
+ ;; annoyance, which makes it fail during ert testing.
+ (let (err)
+ (condition-case err (vc-bzr-command "status" t 0 file)
+ (error (message "Error: %S" err) nil)))
+ (let ((status 'unchanged))
+ ;; the only secure status indication in `bzr status' output
+ ;; is a couple of lines following the pattern::
+ ;; | <status>:
+ ;; | <file name>
+ ;; if the file is up-to-date, we get no status report from `bzr',
+ ;; so if the regexp search for the above pattern fails, we consider
+ ;; the file to be up-to-date.
+ (goto-char (point-min))
+ (when (re-search-forward
+ ;; bzr prints paths relative to the repository root.
+ (concat "^\\(" vc-bzr-state-words "\\):[ \t\n]+"
+ (regexp-quote (vc-bzr-file-name-relative file))
+ ;; Bzr appends a '/' to directory names and
+ ;; '*' to executable files
+ (if (file-directory-p file) "/?" "\\*?")
+ "[ \t\n]*$")
+ nil t)
+ (lexical-let ((statusword (match-string 1)))
+ ;; Erase the status text that matched.
+ (delete-region (match-beginning 0) (match-end 0))
+ (setq status
+ (intern (replace-regexp-in-string " " "" statusword)))))
+ (when status
+ (goto-char (point-min))
+ (skip-chars-forward " \n\t") ;Throw away spaces.
+ (cons status
+ ;; "bzr" will output warnings and informational messages to
+ ;; stderr; due to Emacs's `vc-do-command' (and, it seems,
+ ;; `start-process' itself) limitations, we cannot catch stderr
+ ;; and stdout into different buffers. So, if there's anything
+ ;; left in the buffer after removing the above status
+ ;; keywords, let us just presume that any other message from
+ ;; "bzr" is a user warning, and display it.
+ (unless (eobp) (buffer-substring (point) (point-max))))))))
(defun vc-bzr-state (file)
(lexical-let ((result (vc-bzr-status file)))