;;; -*-Scheme-*-
;;;
-;;; $Id: vc.scm,v 1.70 2000/07/28 15:15:37 cph Exp $
+;;; $Id: vc.scm,v 1.71 2000/08/18 20:22:38 cph Exp $
;;;
;;; Copyright (c) 1994-2000 Massachusetts Institute of Technology
;;;
(vc-save-workfile-buffer workfile)
(vc-start-entry workfile "Enter initial comment."
(or comment
- (if (ref-variable vc-initial-comment buffer)
- #f
- ""))
+ (if (ref-variable vc-initial-comment buffer) #f ""))
(let ((keep?
(or keep?
(ref-variable vc-keep-workfiles buffer))))
(vc-backend-checkout master revision #t #f)
(vc-revert-workfile-buffer master #t))))
(cond ((not (and (let ((value (ref-variable vc-checkout-carefully)))
- (if (boolean? value)
- value
- (value)))
+ (if (boolean? value) value (value)))
(vc-workfile-modified? master)))
(do-it))
((cleanup-pop-up-buffers
(extract-string (re-match-start 2) (re-match-end 2))))))
(define (get-cvs-status master parse-output)
- (let ((pathname (vc-master-workfile master)))
- (vc-run-command master
- `((DIRECTORY ,(directory-pathname pathname))
- (BUFFER " *vc-status*"))
- "cvs" "status" (file-pathname pathname)))
+ (vc-run-command master
+ `((BUFFER " *vc-status*"))
+ "cvs" "status"
+ (file-pathname (vc-master-workfile master)))
(parse-output (buffer-start (find-or-create-buffer " *vc-status*"))))
(define (convert-cvs-status status)
(lambda ()
(vc-run-command workfile '() "cvs" "add"
"-m" comment
- workfile)))))
+ (file-pathname workfile))))))
\f
(define-vc-type-operation 'CHECKOUT vc-type:cvs
(lambda (master revision lock? workfile)
(revision
(vc-run-command master '() "cvs" (and lock? "-w") "update"
(cvs-rev-switch revision)
- (vc-master-workfile master)))
+ (file-pathname (vc-master-workfile master))))
(else
- (vc-run-command master '() "cvs" "edit"
- (vc-master-workfile master))))))))
+ (vc-run-command
+ master '() "cvs" "edit"
+ (file-pathname (vc-master-workfile master)))))))))
(define-vc-type-operation 'CHECKIN vc-type:cvs
(lambda (master revision comment keep?)
(trunk-revision? revision))
(vc-run-command master '() "cvs" "commit"
"-m" "#intermediate"
- (vc-master-workfile master)))
+ (file-pathname (vc-master-workfile master))))
(vc-run-command master '() "cvs" "commit"
(cvs-rev-switch revision)
"-m" comment
- (vc-master-workfile master))))
+ (file-pathname (vc-master-workfile master)))))
;; If this was an explicit check-in, remove the sticky tag.
(if revision
(vc-run-command master '() "cvs" "update" "-A"
- (vc-master-workfile master)))))))
+ (file-pathname (vc-master-workfile master))))))))
(define-vc-type-operation 'REVERT vc-type:cvs
(lambda (master)
(lambda ()
(let ((workfile (vc-master-workfile master)))
(if (cvs-file-edited? master)
- (vc-run-command master '() "cvs" "unedit" workfile)
+ (vc-run-command master '() "cvs" "unedit"
+ (file-pathname workfile))
(begin
(delete-file-no-errors workfile)
- (vc-run-command master '() "cvs" "update" workfile))))))))
+ (vc-run-command master '() "cvs" "update"
+ (file-pathname workfile)))))))))
(define-vc-type-operation 'STEAL vc-type:cvs
(lambda (master revision)
(vc-workfile-buffer master
#f))
"/dev/null"
- (vc-master-workfile master)))))
+ (file-pathname
+ (vc-master-workfile master))))))
(= 1
(vc-run-command master options "cvs" "diff"
(if simple?
(vc-workfile-buffer master #f)))
(and rev1 (string-append "-r" rev1))
(and rev2 (string-append "-r" rev2))
- (vc-master-workfile master)))))))
+ (file-pathname (vc-master-workfile master))))))))
(define-vc-type-operation 'PRINT-LOG vc-type:cvs
(lambda (master)
- (vc-run-command master '() "cvs" "log" (vc-master-workfile master))))
+ (vc-run-command master '() "cvs" "log"
+ (file-pathname (vc-master-workfile master)))))
(define-vc-type-operation 'CHECK-LOG-ENTRY vc-type:cvs
(lambda (master log-buffer)
(with-vc-command-message master "Merging changes into"
(lambda ()
(let ((workfile (vc-master-workfile master)))
- (vc-run-command master '() "cvs" "update" workfile)
+ (vc-run-command master '() "cvs" "update" (file-pathname workfile))
(let ((buffer (get-vc-command-buffer))
(fn (re-quote-string (file-namestring workfile))))
(cond ((re-search-forward
"")
"..."))
(status-limit (option 'STATUS (lambda () 0)))
- (directory (option 'DIRECTORY working-directory-pathname))
+ (directory
+ (option 'DIRECTORY
+ (if workfile
+ (lambda () (directory-pathname workfile))
+ working-directory-pathname)))
(command-buffer
(let ((buffer (option 'BUFFER get-vc-command-buffer)))
(cond ((buffer? buffer) buffer)