From: Chris Hanson Date: Wed, 25 Jun 1997 07:26:48 +0000 (+0000) Subject: Change RCS-FIND-DELTA to have an extra argument saying whether or not X-Git-Tag: 20090517-FFI~5101 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=6499cce99b5ce766b59481e3d932bbbcc64844e3;p=mit-scheme.git Change RCS-FIND-DELTA to have an extra argument saying whether or not to signal an error if there is no such delta. Use this feature to make VC-NEXT-ACTION do the right thing when it is given a version number that doesn't exist. --- diff --git a/v7/src/edwin/vc.scm b/v7/src/edwin/vc.scm index 0549fec92..50deed39c 100644 --- a/v7/src/edwin/vc.scm +++ b/v7/src/edwin/vc.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: vc.scm,v 1.25 1996/12/16 04:57:32 cph Exp $ +;;; $Id: vc.scm,v 1.26 1997/06/25 07:26:48 cph Exp $ ;;; -;;; Copyright (c) 1994-96 Massachusetts Institute of Technology +;;; Copyright (c) 1994-97 Massachusetts Institute of Technology ;;; ;;; This material was developed by the Scheme project at the ;;; Massachusetts Institute of Technology, Department of @@ -1009,12 +1009,15 @@ the value of vc-log-mode-hook." (define-vc-type-operation 'LOCKING-USER vc-type:rcs (lambda (master revision) (let ((admin (vc-admin master))) - (let ((delta (rcs-find-delta admin revision))) - (let loop ((locks (rcs-admin/locks admin))) - (and (not (null? locks)) - (if (eq? delta (cdar locks)) - (caar locks) - (loop (cdr locks))))))))) + (let ((delta (rcs-find-delta admin revision #f))) + (if delta + (let loop ((locks (rcs-admin/locks admin))) + (and (not (null? locks)) + (if (eq? delta (cdar locks)) + (caar locks) + (loop (cdr locks))))) + ;; Kludge: this causes the next action to be a checkin. + (current-user-name)))))) (define-vc-type-operation 'MODE-LINE-STATUS vc-type:rcs (lambda (master buffer) @@ -1153,7 +1156,7 @@ the value of vc-log-mode-hook." (define-vc-type-operation 'DEFAULT-VERSION vc-type:rcs (lambda (master) - (rcs-delta/number (rcs-find-delta (vc-admin master) #f)))) + (rcs-delta/number (rcs-find-delta (vc-admin master) #f #t)))) (define-vc-type-operation 'BUFFER-VERSION vc-type:rcs (lambda (master buffer)