166 |
|
|
167 |
Automatically retrieve a read-only version of the file with keywords |
Automatically retrieve a read-only version of the file with keywords |
168 |
expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile." |
expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile." |
169 |
(let* ((switches (append |
(let* ((dirname (or (file-name-directory file) "")) |
|
(if (stringp vc-register-switches) |
|
|
(list vc-register-switches) |
|
|
vc-register-switches) |
|
|
(if (stringp vc-sccs-register-switches) |
|
|
(list vc-sccs-register-switches) |
|
|
vc-sccs-register-switches))) |
|
|
(dirname (or (file-name-directory file) "")) |
|
170 |
(basename (file-name-nondirectory file)) |
(basename (file-name-nondirectory file)) |
171 |
(project-file (vc-sccs-search-project-dir dirname basename))) |
(project-file (vc-sccs-search-project-dir dirname basename))) |
172 |
(let ((vc-name |
(let ((vc-name |
173 |
(or project-file |
(or project-file |
174 |
(format (car vc-sccs-master-templates) dirname basename)))|) |
(format (car vc-sccs-master-templates) dirname basename)))) |
175 |
(apply 'vc-do-command nil 0 "admin" vc-name |
(apply 'vc-do-command nil 0 "admin" vc-name |
176 |
(and rev (concat "-r" rev)) |
(and rev (concat "-r" rev)) |
177 |
"-fb" |
"-fb" |
178 |
(concat "-i" (file-relative-name file)) |
(concat "-i" (file-relative-name file)) |
179 |
(and comment (concat "-y" comment)) |
(and comment (concat "-y" comment)) |
180 |
switches)) |
(vc-switches 'SCCS 'register))) |
181 |
(delete-file file) |
(delete-file file) |
182 |
(if vc-keep-workfiles |
(if vc-keep-workfiles |
183 |
(vc-do-command nil 0 "get" (vc-name file))))) |
(vc-do-command nil 0 "get" (vc-name file))))) |
191 |
|
|
192 |
(defun vc-sccs-checkin (file rev comment) |
(defun vc-sccs-checkin (file rev comment) |
193 |
"SCCS-specific version of `vc-backend-checkin'." |
"SCCS-specific version of `vc-backend-checkin'." |
194 |
(let ((switches (if (stringp vc-checkin-switches) |
(apply 'vc-do-command nil 0 "delta" (vc-name file) |
195 |
(list vc-checkin-switches) |
(if rev (concat "-r" rev)) |
196 |
vc-checkin-switches))) |
(concat "-y" comment) |
197 |
(apply 'vc-do-command nil 0 "delta" (vc-name file) |
(vc-switches 'SCCS 'checkin)) |
198 |
(if rev (concat "-r" rev)) |
(if vc-keep-workfiles |
199 |
(concat "-y" comment) |
(vc-do-command nil 0 "get" (vc-name file)))) |
|
switches) |
|
|
(if vc-keep-workfiles |
|
|
(vc-do-command nil 0 "get" (vc-name file))))) |
|
200 |
|
|
201 |
(defun vc-sccs-find-version (file rev buffer) |
(defun vc-sccs-find-version (file rev buffer) |
202 |
(apply 'vc-do-command |
(apply 'vc-do-command |
206 |
(and rev |
(and rev |
207 |
(concat "-r" |
(concat "-r" |
208 |
(vc-sccs-lookup-triple file rev))) |
(vc-sccs-lookup-triple file rev))) |
209 |
(if (stringp vc-checkout-switches) |
(vc-switches 'SCCS 'checkout))) |
|
(list vc-checkout-switches) |
|
|
vc-checkout-switches))) |
|
210 |
|
|
211 |
(defun vc-sccs-checkout (file &optional editable rev) |
(defun vc-sccs-checkout (file &optional editable rev) |
212 |
"Retrieve a copy of a saved version of SCCS controlled FILE. |
"Retrieve a copy of a saved version of SCCS controlled FILE. |
218 |
(save-excursion |
(save-excursion |
219 |
;; Change buffers to get local value of vc-checkout-switches. |
;; Change buffers to get local value of vc-checkout-switches. |
220 |
(if file-buffer (set-buffer file-buffer)) |
(if file-buffer (set-buffer file-buffer)) |
221 |
(setq switches (if (stringp vc-checkout-switches) |
(setq switches (vc-switches 'SCCS 'checkout)) |
|
(list vc-checkout-switches) |
|
|
vc-checkout-switches)) |
|
222 |
;; Save this buffer's default-directory |
;; Save this buffer's default-directory |
223 |
;; and use save-excursion to make sure it is restored |
;; and use save-excursion to make sure it is restored |
224 |
;; in the same buffer it was saved in. |
;; in the same buffer it was saved in. |
284 |
(append (list "-q" |
(append (list "-q" |
285 |
(and oldvers (concat "-r" oldvers)) |
(and oldvers (concat "-r" oldvers)) |
286 |
(and newvers (concat "-r" newvers))) |
(and newvers (concat "-r" newvers))) |
287 |
(vc-diff-switches-list 'SCCS)))) |
(vc-switches 'SCCS 'diff)))) |
288 |
|
|
289 |
|
|
290 |
;;; |
;;; |