summaryrefslogtreecommitdiff
path: root/lisp/vc
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2013-09-26 10:37:16 +0300
committerEli Zaretskii <eliz@gnu.org>2013-09-26 10:37:16 +0300
commitb87c4ff2817e71ca71b028792200b1e069a95e04 (patch)
treebfe00c0655fa02078a9ab2c633ea06d90c4a2064 /lisp/vc
parentbbc108377873aa6ed7cf21c731770103096eea39 (diff)
parentba355de014b75ed104da4777f909db70d62f2357 (diff)
downloademacs-b87c4ff2817e71ca71b028792200b1e069a95e04.tar.gz
Merge from trunk.
Diffstat (limited to 'lisp/vc')
-rw-r--r--lisp/vc/ediff.el2
-rw-r--r--lisp/vc/pcvs.el2
-rw-r--r--lisp/vc/vc-bzr.el6
-rw-r--r--lisp/vc/vc-cvs.el10
-rw-r--r--lisp/vc/vc-dir.el1
-rw-r--r--lisp/vc/vc-dispatcher.el2
-rw-r--r--lisp/vc/vc-git.el4
-rw-r--r--lisp/vc/vc-sccs.el2
-rw-r--r--lisp/vc/vc-svn.el24
-rw-r--r--lisp/vc/vc.el5
10 files changed, 36 insertions, 22 deletions
diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el
index 9ab592587c9..fc47bf0fc10 100644
--- a/lisp/vc/ediff.el
+++ b/lisp/vc/ediff.el
@@ -1481,7 +1481,7 @@ When called interactively, displays the version."
(format "Ediff %s of %s" ediff-version ediff-date)))
;; info is run first, and will autoload info.el.
-(declare-function Info-goto-node "info" (nodename &optional fork))
+(declare-function Info-goto-node "info" (nodename &optional fork strict-case))
;;;###autoload
(defun ediff-documentation (&optional node)
diff --git a/lisp/vc/pcvs.el b/lisp/vc/pcvs.el
index 914eef4dd39..539e8b43735 100644
--- a/lisp/vc/pcvs.el
+++ b/lisp/vc/pcvs.el
@@ -1963,7 +1963,7 @@ With a prefix argument, prompt for cvs flags."
This command ignores files that are not flagged as `Unknown'."
(interactive)
(dolist (fi (cvs-mode-marked 'ignore))
- (cvs-append-to-ignore (cvs-fileinfo->dir fi) (cvs-fileinfo->file fi)
+ (vc-cvs-append-to-ignore (cvs-fileinfo->dir fi) (cvs-fileinfo->file fi)
(eq (cvs-fileinfo->subtype fi) 'NEW-DIR))
(setf (cvs-fileinfo->type fi) 'DEAD))
(cvs-cleanup-collection cvs-cookies nil nil nil))
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index 5f5416dc2ff..00604088c17 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -320,11 +320,10 @@ in the repository root directory of FILE."
("^Using saved parent location: \\(.+\\)" 1 nil nil 0))
"Value of `compilation-error-regexp-alist' in *vc-bzr* buffers.")
-;; Follows vc-bzr-(async-)command, which uses vc-do-(async-)command
-;; from vc-dispatcher.
+;; To be called via vc-pull from vc.el, which requires vc-dispatcher.
(declare-function vc-exec-after "vc-dispatcher" (code))
-;; Follows vc-exec-after.
(declare-function vc-set-async-update "vc-dispatcher" (process-buffer))
+(declare-function vc-compilation-mode "vc-dispatcher" (backend))
(defun vc-bzr-pull (prompt)
"Pull changes into the current Bzr branch.
@@ -354,6 +353,7 @@ prompt for the Bzr command to run."
(setq vc-bzr-program (car args)
command (cadr args)
args (cddr args)))
+ (require 'vc-dispatcher)
(let ((buf (apply 'vc-bzr-async-command command args)))
(with-current-buffer buf (vc-run-delayed (vc-compilation-mode 'bzr)))
(vc-set-async-update buf))))
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el
index 931193c46e0..57e23aba4d9 100644
--- a/lisp/vc/vc-cvs.el
+++ b/lisp/vc/vc-cvs.el
@@ -1226,11 +1226,11 @@ is non-nil."
table (lambda () (vc-cvs-revision-table (car files))))))
table))
-(defun vc-cvs-ignore (file)
+(defun vc-cvs-ignore (file &optional _directory _remove)
"Ignore FILE under CVS."
- (cvs-append-to-ignore (file-name-directory file) file))
+ (vc-cvs-append-to-ignore (file-name-directory file) file))
-(defun cvs-append-to-ignore (dir str &optional old-dir)
+(defun vc-cvs-append-to-ignore (dir str &optional old-dir)
"In DIR, add STR to the .cvsignore file.
If OLD-DIR is non-nil, then this is a directory that we don't want
to hear about anymore."
@@ -1245,7 +1245,9 @@ to hear about anymore."
(goto-char (point-max))
(unless (bolp) (insert "\n"))
(insert str (if old-dir "/\n" "\n"))
- (if cvs-sort-ignore-file (sort-lines nil (point-min) (point-max)))
+ ;; FIXME this is a pcvs variable.
+ (if (bound-and-true-p cvs-sort-ignore-file)
+ (sort-lines nil (point-min) (point-max)))
(save-buffer)))
(provide 'vc-cvs)
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 5ddcfd57748..1e6ec15174a 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -245,6 +245,7 @@ See `run-hooks'."
(define-key map "+" 'vc-update) ;; C-x v +
(define-key map "l" 'vc-print-log) ;; C-x v l
(define-key map "L" 'vc-print-root-log) ;; C-x v L
+ (define-key map "I" 'vc-log-incoming) ;; C-x v I
;; More confusing than helpful, probably
;;(define-key map "R" 'vc-revert) ;; u is taken by vc-dir-unmark.
;;(define-key map "A" 'vc-annotate) ;; g is taken by revert-buffer
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index 7888752553e..62fb72d0fbc 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -398,6 +398,8 @@ Display the buffer in some window, but don't select it."
(set (make-local-variable 'compilation-error-regexp-alist)
error-regexp-alist)))
+(declare-function vc-dir-refresh "vc-dir" ())
+
(defun vc-set-async-update (process-buffer)
"Set a `vc-exec-after' action appropriate to the current buffer.
This action will update the current buffer after the current
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index a4ce3a2c46c..e730db17526 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -706,6 +706,9 @@ It is based on `log-edit-mode', and has Git-specific extensions.")
'(("^ \\(.+\\) |" 1 nil nil 0))
"Value of `compilation-error-regexp-alist' in *vc-git* buffers.")
+;; To be called via vc-pull from vc.el, which requires vc-dispatcher.
+(declare-function vc-compilation-mode "vc-dispatcher" (backend))
+
(defun vc-git-pull (prompt)
"Pull changes into the current Git branch.
Normally, this runs \"git pull\". If PROMPT is non-nil, prompt
@@ -725,6 +728,7 @@ for the Git command to run."
(setq git-program (car args)
command (cadr args)
args (cddr args)))
+ (require 'vc-dispatcher)
(apply 'vc-do-async-command buffer root git-program command args)
(with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'git)))
(vc-set-async-update buffer)))
diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el
index e00d55218c8..d78564e15ed 100644
--- a/lisp/vc/vc-sccs.el
+++ b/lisp/vc/vc-sccs.el
@@ -506,7 +506,7 @@ Remaining arguments are ignored."
;; a (autoload 'vc-sccs-search-project-dir "vc-sccs") which would not
;; help us avoid loading vc-sccs.
;;;###autoload
-(progn (defun vc-sccs-search-project-dir (dirname basename)
+(progn (defun vc-sccs-search-project-dir (_dirname basename)
"Return the name of a master file in the SCCS project directory.
Does not check whether the file exists but returns nil if it does not
find any project directory."
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el
index afc76c09742..36f27548123 100644
--- a/lisp/vc/vc-svn.el
+++ b/lisp/vc/vc-svn.el
@@ -234,12 +234,12 @@ RESULT is a list of conses (FILE . STATE) for directory DIR."
(vc-run-delayed
(vc-svn-after-dir-status callback remote))))
-(defun vc-svn-dir-status-files (dir files _default-state callback)
+(defun vc-svn-dir-status-files (_dir files _default-state callback)
(apply 'vc-svn-command (current-buffer) 'async nil "status" files)
(vc-run-delayed
(vc-svn-after-dir-status callback)))
-(defun vc-svn-dir-extra-headers (dir)
+(defun vc-svn-dir-extra-headers (_dir)
"Generate extra status headers for a Subversion working copy."
(let (process-file-side-effects)
(vc-svn-command "*vc*" 0 nil "info"))
@@ -352,7 +352,7 @@ This is only possible if SVN is responsible for FILE's directory.")
(concat "-r" rev))
(vc-switches 'SVN 'checkout))))
-(defun vc-svn-ignore (file &optional directory remove)
+(defun vc-svn-ignore (file &optional _directory _remove)
"Ignore FILE under Subversion.
FILE is a file wildcard, relative to the root directory of DIRECTORY."
(vc-svn-command t 0 file "propedit" "svn:ignore"))
@@ -593,7 +593,7 @@ NAME is assumed to be a URL."
(vc-svn-command nil 0 dir "copy" name)
(when branchp (vc-svn-retrieve-tag dir name nil)))
-(defun vc-svn-retrieve-tag (dir name update)
+(defun vc-svn-retrieve-tag (dir name _update)
"Retrieve a tag at and below DIR.
NAME is the name of the tag; if it is empty, do a `svn update'.
If UPDATE is non-nil, then update (resynch) any affected buffers.
@@ -674,19 +674,23 @@ and that it passes `vc-svn-global-switches' to it before FLAGS."
(defun vc-svn-parse-status (&optional filename)
"Parse output of \"svn status\" command in the current buffer.
-Set file properties accordingly. Unless FILENAME is non-nil, parse only
-information about FILENAME and return its status."
- (let (file status propstat)
+Set file properties accordingly. If FILENAME is non-nil, return its status."
+ (let (multifile file status propstat)
(goto-char (point-min))
(while (re-search-forward
;; Ignore the files with status X.
"^\\(?:\\?\\|[ ACDGIMR!~][ MC][ L][ +][ S]..\\([ *]\\) +\\([-0-9]+\\) +\\([0-9?]+\\) +\\([^ ]+\\)\\) +" nil t)
;; If the username contains spaces, the output format is ambiguous,
;; so don't trust the output's filename unless we have to.
- (setq file (or filename
+ (setq file (or (unless multifile filename)
(expand-file-name
- (buffer-substring (point) (line-end-position)))))
- (setq status (char-after (line-beginning-position))
+ (buffer-substring (point) (line-end-position))))
+ ;; If we are parsing the result of running status on a directory,
+ ;; there could be multiple files in the output.
+ ;; We assume that filename, if supplied, applies to the first
+ ;; listed file (ie, the directory). Bug#15322.
+ multifile t
+ status (char-after (line-beginning-position))
;; Status of the item's properties ([ MC]).
propstat (char-after (1+ (line-beginning-position))))
(if (eq status ??)
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 39e3fbdc29a..69098efc50b 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -965,7 +965,8 @@ Within directories, only files already under version control are noticed."
"Deduce a set of files and a backend to which to apply an operation.
Return (BACKEND FILESET FILESET-ONLY-FILES STATE CHECKOUT-MODEL).
-If we're in VC-dir mode, FILESET is the list of marked files.
+If we're in VC-dir mode, FILESET is the list of marked files,
+or the directory if no files are marked.
Otherwise, if in a buffer visiting a version-controlled file,
FILESET is a single-file fileset containing that file.
Otherwise, if ALLOW-UNREGISTERED is non-nil and the visited file
@@ -2335,7 +2336,7 @@ When called interactively with a prefix argument, prompt for LIMIT."
;;;###autoload
(defun vc-log-incoming (&optional remote-location)
"Show a log of changes that will be received with a pull operation from REMOTE-LOCATION.
-When called interactively with a prefix argument, prompt for REMOTE-LOCATION.."
+When called interactively with a prefix argument, prompt for REMOTE-LOCATION."
(interactive
(when current-prefix-arg
(list (read-string "Remote location (empty for default): "))))