;;; History functions
;;;
-(defun vc-cvs-print-log (files &optional buffer)
+(declare-function vc-rcs-print-log-cleanup "vc-rcs" ())
+
+(defun vc-cvs-print-log (files &optional buffer shortlog)
"Get change logs associated with FILES."
+ (require 'vc-rcs)
;; It's just the catenation of the individual logs.
(vc-cvs-command
buffer
(if (vc-stay-local-p files 'CVS) 'async 0)
- files "log"))
+ files "log")
+ (with-current-buffer buffer
+ (vc-exec-after (vc-rcs-print-log-cleanup))))
(defun vc-cvs-comment-history (file)
"Get comment history of a file."
(match-string-no-properties 1)
nil)))
+(defun vc-cvs-previous-revision (file rev)
+ (vc-call-backend 'RCS 'previous-revision file rev))
+
+(defun vc-cvs-next-revision (file rev)
+ (vc-call-backend 'RCS 'next-revision file rev))
+
+;; FIXME: This should probably be replaced by code using cvs2cl.
+(defun vc-cvs-update-changelog (files)
+ (vc-call-backend 'RCS 'update-changelog files))
+
;;;
;;; Tag system
;;;
)
;; Based on vc-cvs-dir-state-heuristic from Emacs 22.
+;; FIXME does not mention unregistered files.
(defun vc-cvs-dir-status-heuristic (dir update-function &optional basedir)
"Find the CVS state of all files in DIR, using only local information."
(let (file basename status result dirlist)
;; This is intentionally different from the algorithm that CVS uses
;; (which is based on textual comparison), because there can be problems
;; generating a time string that looks exactly like the one from CVS.
- (let ((mtime (nth 5 (file-attributes file))))
- (require 'parse-time)
- (let ((parsed-time
- (parse-time-string (concat (match-string 2) " +0000"))))
- (cond ((and (not (string-match "\\+" (match-string 2)))
- (car parsed-time)
- (equal mtime (apply 'encode-time parsed-time)))
- (vc-file-setprop file 'vc-checkout-time mtime)
- (if set-state (vc-file-setprop file 'vc-state 'up-to-date)))
- (t
- (vc-file-setprop file 'vc-checkout-time 0)
- (if set-state (vc-file-setprop file 'vc-state 'edited)))))))))
+ (let* ((time (match-string 2))
+ (mtime (nth 5 (file-attributes file)))
+ (parsed-time (progn (require 'parse-time)
+ (parse-time-string (concat time " +0000")))))
+ (cond ((and (not (string-match "\\+" time))
+ (car parsed-time)
+ (equal mtime (apply 'encode-time parsed-time)))
+ (vc-file-setprop file 'vc-checkout-time mtime)
+ (if set-state (vc-file-setprop file 'vc-state 'up-to-date)))
+ (t
+ (vc-file-setprop file 'vc-checkout-time 0)
+ (if set-state (vc-file-setprop file 'vc-state 'edited))))))))
;; Completion of revision names.
;; Just so I don't feel like I'm duplicating code from pcl-cvs, I'll use