comparison lisp/vc-rcs.el @ 94521:2a61c5f918a5

Change 'needs-patch to 'needs-update.
author Eric S. Raymond <esr@snark.thyrsus.com>
date Thu, 01 May 2008 19:13:16 +0000
parents ad6c174910db
children a69dcc2c42ae
comparison
equal deleted inserted replaced
94520:069edac43148 94521:2a61c5f918a5
116 (progn 116 (progn
117 (defun vc-rcs-registered (f) (vc-default-registered 'RCS f))) 117 (defun vc-rcs-registered (f) (vc-default-registered 'RCS f)))
118 118
119 (defun vc-rcs-state (file) 119 (defun vc-rcs-state (file)
120 "Implementation of `vc-state' for RCS." 120 "Implementation of `vc-state' for RCS."
121 (or (boundp 'vc-rcs-headers-result) 121 (if (not (vc-rc-registered f))
122 (and vc-consult-headers 122 'unregistered
123 (vc-rcs-consult-headers file))) 123 (or (boundp 'vc-rcs-headers-result)
124 (let ((state 124 (and vc-consult-headers
125 ;; vc-working-revision might not be known; in that case the 125 (vc-rcs-consult-headers file)))
126 ;; property is nil. vc-rcs-fetch-master-state knows how to 126 (let ((state
127 ;; handle that. 127 ;; vc-working-revision might not be known; in that case the
128 (vc-rcs-fetch-master-state file 128 ;; property is nil. vc-rcs-fetch-master-state knows how to
129 (vc-file-getprop file 129 ;; handle that.
130 'vc-working-revision)))) 130 (vc-rcs-fetch-master-state file
131 (if (not (eq state 'up-to-date)) 131 (vc-file-getprop file
132 state 132 'vc-working-revision))))
133 (if (vc-workfile-unchanged-p file) 133 (if (not (eq state 'up-to-date))
134 'up-to-date 134 state
135 (if (eq (vc-rcs-checkout-model file) 'locking) 135 (if (vc-workfile-unchanged-p file)
136 'unlocked-changes 136 'up-to-date
137 'edited))))) 137 (if (eq (vc-rcs-checkout-model file) 'locking)
138 'unlocked-changes
139 'edited))))))
138 140
139 (defun vc-rcs-state-heuristic (file) 141 (defun vc-rcs-state-heuristic (file)
140 "State heuristic for RCS." 142 "State heuristic for RCS."
141 (let (vc-rcs-headers-result) 143 (let (vc-rcs-headers-result)
142 (if (and vc-consult-headers 144 (if (and vc-consult-headers
887 (if (or workfile-is-latest 889 (if (or workfile-is-latest
888 (vc-rcs-latest-on-branch-p file working-revision)) 890 (vc-rcs-latest-on-branch-p file working-revision))
889 ;; workfile version is latest on branch 891 ;; workfile version is latest on branch
890 'up-to-date 892 'up-to-date
891 ;; workfile version is not latest on branch 893 ;; workfile version is not latest on branch
892 'needs-patch)) 894 'needs-update))
893 ;; locked by the calling user 895 ;; locked by the calling user
894 ((and (stringp locking-user) 896 ((and (stringp locking-user)
895 (string= locking-user (vc-user-login-name file))) 897 (string= locking-user (vc-user-login-name file)))
896 (if (or (eq (vc-rcs-checkout-model file) 'locking) 898 (if (or (eq (vc-rcs-checkout-model file) 'locking)
897 workfile-is-latest 899 workfile-is-latest