;;; vc-cvs.el --- non-resident support for CVS version-control -*- lexical-binding: t -*-
-;; Copyright (C) 1995, 1998-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1998-2016 Free Software Foundation, Inc.
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
(eval-when-compile (require 'vc))
+(declare-function vc-branch-p "vc" (rev))
+(declare-function vc-checkout "vc" (file &optional rev))
+(declare-function vc-expand-dirs "vc" (file-or-dir-list backend))
+(declare-function vc-read-revision "vc"
+ (prompt &optional files backend default initial-input))
+
;; Clear up the cache to force vc-call to check again and discover
;; new functions when we reload this file.
(put 'CVS 'vc-functions nil)
:version "21.1"
:group 'vc-cvs)
-(defcustom vc-stay-local 'only-file
+(defcustom vc-cvs-stay-local 'only-file
"Non-nil means use local operations when possible for remote repositories.
This avoids slow queries over the network and instead uses heuristics
and past information to determine the current status of a file.
all other VC operations.
The value can also be a regular expression or list of regular
-expressions to match against the host name of a repository; then VC
-only stays local for hosts that match it. Alternatively, the value
-can be a list of regular expressions where the first element is the
-symbol `except'; then VC always stays local except for hosts matched
-by these regular expressions."
+expressions to match against the host name of a repository; then
+vc-cvs only stays local for hosts that match it. Alternatively,
+the value can be a list of regular expressions where the first
+element is the symbol `except'; then vc-cvs always stays local
+except for hosts matched by these regular expressions."
:type '(choice (const :tag "Always stay local" t)
(const :tag "Only for file operations" only-file)
(const :tag "Don't stay local" nil)
"Specify the mode-line display of sticky tags.
Value t means default display, nil means no display at all. If the
value is a function or macro, it is called with the sticky tag and
-its' type as parameters, in that order. TYPE can have three different
+its type as parameters, in that order. TYPE can have three different
values: `symbolic-name' (TAG is a string), `revision-number' (TAG is a
string) and `date' (TAG is a date as returned by `encode-time'). The
return value of the function or macro will be displayed as a string.
dates and the word \"Sticky\" for sticky tag names and revisions.
(lambda (tag type)
- (cond ((eq type 'date) (format-time-string
+ (cond ((eq type \\='date) (format-time-string
vc-cvs-sticky-date-format-string tag))
- ((eq type 'revision-number) \"Sticky\")
- ((eq type 'symbolic-name) \"Sticky\")))
+ ((eq type \\='revision-number) \"Sticky\")
+ ((eq type \\='symbolic-name) \"Sticky\")))
Here's an example that will abbreviate to the first character only,
any text before the first occurrence of `-' for sticky symbolic tags.
displayed. Date and time is displayed for sticky dates.
(lambda (tag type)
- (cond ((eq type 'date) (format-time-string \"%Y%m%d %H:%M\" tag))
- ((eq type 'revision-number) \"Sticky\")
- ((eq type 'symbolic-name)
+ (cond ((eq type \\='date) (format-time-string \"%Y%m%d %H:%M\" tag))
+ ((eq type \\='revision-number) \"Sticky\")
+ ((eq type \\='symbolic-name)
(condition-case nil
(progn
(string-match \"\\\\([^-]*\\\\)\\\\(.*\\\\)\" tag)
individually should stay local."
(if (listp file)
(delq nil (mapcar (lambda (arg) (vc-cvs-stay-local-p arg)) file))
- (let* ((sym (vc-make-backend-sym 'CVS 'stay-local))
- (stay-local (if (boundp sym) (symbol-value sym) vc-stay-local)))
+ (let ((stay-local vc-cvs-stay-local))
(if (symbolp stay-local) stay-local
(let ((dirname (if (file-directory-p file)
(directory-file-name file)
(setq host uhost))
;; Remove empty HOST
(and (equal host "")
- (setq host))
+ (setq host nil))
;; Fix windows style CVS root `:local:C:\\project\\cvs\\some\\dir'
(and host
(equal method "local")
- (setq root (concat host ":" root) host))
+ (setq root (concat host ":" root) host nil))
;; Normalize CVS root record
(list method user host root)))))
(defun vc-cvs-parse-status (&optional full)
"Parse output of \"cvs status\" command in the current buffer.
Set file properties accordingly. Unless FULL is t, parse only
-essential information. Note that this can never set the 'ignored
+essential information. Note that this can never set the `ignored'
state."
(let (file status missing)
(goto-char (point-min))