;;; vc-cvs.el --- non-resident support for CVS version-control -*- lexical-binding: t -*-
-;; Copyright (C) 1995, 1998-2014 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1998-2015 Free Software Foundation, Inc.
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
:version "21.1"
:group 'vc-cvs)
+(defcustom vc-cvs-annotate-switches nil
+ "String or list of strings specifying switches for cvs annotate under VC.
+If nil, use the value of `vc-annotate-switches'. If t, use no
+switches."
+ :type '(choice (const :tag "Unspecified" nil)
+ (const :tag "None" t)
+ (string :tag "Argument String")
+ (repeat :tag "Argument List" :value ("") string))
+ :version "25.1"
+ :group 'vc-cvs)
+
(defcustom vc-cvs-header '("\$Id\$")
"Header keywords to be inserted by `vc-insert-headers'."
:version "24.1" ; no longer consult the obsolete vc-header-alist
(autoload 'vc-version-backup-file "vc")
(declare-function vc-coding-system-for-diff "vc" (file))
-(defun vc-cvs-diff (files &optional async oldvers newvers buffer)
+(defun vc-cvs-diff (files &optional oldvers newvers buffer async)
"Get a difference report using CVS between two revisions of FILE."
(let* (process-file-side-effects
(async (and async (vc-cvs-stay-local-p files)))
(defun vc-cvs-annotate-command (file buffer &optional revision)
"Execute \"cvs annotate\" on FILE, inserting the contents in BUFFER.
Optional arg REVISION is a revision to annotate from."
- (vc-cvs-command buffer
- (if (vc-cvs-stay-local-p file)
- 'async 0)
- file "annotate"
- (if revision (concat "-r" revision)))
+ (apply #'vc-cvs-command buffer
+ (if (vc-cvs-stay-local-p file)
+ 'async 0)
+ file "annotate"
+ (append (vc-switches 'cvs 'annotate)
+ (if revision (list (concat "-r" revision)))))
;; Strip the leading few lines.
(let ((proc (get-buffer-process buffer)))
(if proc
(re-search-forward vc-cvs-annotate-first-line-re)
(delete-region (point-min) (1- (point)))))))
-(declare-function vc-annotate-convert-time "vc-annotate" (time))
+(declare-function vc-annotate-convert-time "vc-annotate" (&optional time))
(defun vc-cvs-annotate-current-time ()
"Return the current time, based at midnight of the current day, and
(if (and (not files) local (not (eq local 'only-file)))
(vc-cvs-dir-status-heuristic dir update-function)
(if (not files) (setq files (vc-expand-dirs (list dir) 'CVS)))
- (vc-cvs-command (current-buffer) 'async dir "-f" "status" files)
+ (vc-cvs-command (current-buffer) 'async files "-f" "status")
;; Alternative implementation: use the "update" command instead of
;; the "status" command.
;; (vc-cvs-command (current-buffer) 'async