:version "21.1"
:group 'vc-rcs)
-(defcustom vc-rcs-header '("\$Id\$")
+(defcustom vc-rcs-header '("$Id\ $")
"Header keywords to be inserted by `vc-insert-headers'."
:type '(repeat string)
:version "24.1" ; no longer consult the obsolete vc-header-alist
;; if available, use the secure registering option
(and (vc-rcs-release-p "5.6.4") "-i")
"-u"
- (and comment (concat "-t-" comment))
+ ;; Some old MS-Windows ports of RCS crash when "ci -i" is
+ ;; invoked without -t; indulge them.
+ (concat "-t-" (or comment ""))
(vc-switches 'RCS 'register))
;; parse output to find master file name and workfile version
(with-current-buffer "*vc*"
(yes-or-no-p (format "Directory %s is empty; remove it? " dir))
(delete-directory dir)))))
-;; It used to be possible to pass in a value for the variable rev, but
-;; nothing in the rest of VC used this capability. Removing it makes the
-;; backend interface simpler for all modes.
-;;
-(defun vc-rcs-checkin (files comment)
+(defun vc-rcs-checkin (files comment &optional rev)
"RCS-specific version of `vc-backend-checkin'."
- (let (rev (switches (vc-switches 'RCS 'checkin)))
+ (let ((switches (vc-switches 'RCS 'checkin)))
;; Now operate on the files
(dolist (file (vc-expand-dirs files 'RCS))
(let ((old-version (vc-working-revision file)) new-version
(default-branch (vc-file-getprop file 'vc-rcs-default-branch)))
;; Force branch creation if an appropriate
;; default branch has been set.
- (and default-branch
+ (and (not rev)
+ default-branch
(string-match (concat "^" (regexp-quote old-version) "\\.")
default-branch)
(setq rev default-branch)
(setq switches (cons "-f" switches)))
- (if old-version
- (setq rev (vc-branch-part old-version))
- (error "can't find current branch"))
+ (if (and (not rev) old-version)
+ (setq rev (vc-branch-part old-version)))
(apply #'vc-do-command "*vc*" 0 "ci" (vc-master-name file)
;; if available, use the secure check-in option
(and (vc-rcs-release-p "5.6.4") "-j")
(insert (gethash (get-text-property (point) :vc-rcs-r/d/a) ht))
(forward-line 1))))
-(declare-function vc-annotate-convert-time "vc-annotate" (time))
+(declare-function vc-annotate-convert-time "vc-annotate" (&optional time))
(defun vc-rcs-annotate-current-time ()
"Return the current time, based at midnight of the current day, and
(defun vc-release-greater-or-equal (r1 r2)
"Compare release numbers, represented as strings.
Release components are assumed cardinal numbers, not decimal fractions
-\(5.10 is a higher release than 5.9\). Omitted fields are considered
-lower \(5.6.7 is earlier than 5.6.7.1\). Comparison runs till the end
+\(5.10 is a higher release than 5.9). Omitted fields are considered
+lower \(5.6.7 is earlier than 5.6.7.1). Comparison runs till the end
of the string is found, or a non-numeric component shows up \(5.6.7 is
earlier than \"5.6.7 beta\", which is probably not what you want in
-some cases\). This code is suitable for existing RCS release numbers.
-CVS releases are handled reasonably, too \(1.3 < 1.4* < 1.5\)."
+some cases). This code is suitable for existing RCS release numbers.
+CVS releases are handled reasonably, too \(1.3 < 1.4* < 1.5)."
(let (v1 v2 i1 i2)
(catch 'done
(or (and (string-match "^\\.?\\([0-9]+\\)" r1)