235 |
|
|
236 |
Automatically retrieve a read-only version of the file with keywords |
Automatically retrieve a read-only version of the file with keywords |
237 |
expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile." |
expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile." |
238 |
(let ((subdir (expand-file-name "RCS" (file-name-directory file))) |
(let ((subdir (expand-file-name "RCS" (file-name-directory file)))) |
|
(switches (append |
|
|
(if (stringp vc-register-switches) |
|
|
(list vc-register-switches) |
|
|
vc-register-switches) |
|
|
(if (stringp vc-rcs-register-switches) |
|
|
(list vc-rcs-register-switches) |
|
|
vc-rcs-register-switches)))) |
|
|
|
|
239 |
(and (not (file-exists-p subdir)) |
(and (not (file-exists-p subdir)) |
240 |
(not (directory-files (file-name-directory file) |
(not (directory-files (file-name-directory file) |
241 |
nil ".*,v$" t)) |
nil ".*,v$" t)) |
246 |
(and (vc-rcs-release-p "5.6.4") "-i") |
(and (vc-rcs-release-p "5.6.4") "-i") |
247 |
(concat (if vc-keep-workfiles "-u" "-r") rev) |
(concat (if vc-keep-workfiles "-u" "-r") rev) |
248 |
(and comment (concat "-t-" comment)) |
(and comment (concat "-t-" comment)) |
249 |
switches) |
(vc-switches 'RCS 'register)) |
250 |
;; parse output to find master file name and workfile version |
;; parse output to find master file name and workfile version |
251 |
(with-current-buffer "*vc*" |
(with-current-buffer "*vc*" |
252 |
(goto-char (point-min)) |
(goto-char (point-min)) |
304 |
|
|
305 |
(defun vc-rcs-checkin (file rev comment) |
(defun vc-rcs-checkin (file rev comment) |
306 |
"RCS-specific version of `vc-backend-checkin'." |
"RCS-specific version of `vc-backend-checkin'." |
307 |
(let ((switches (if (stringp vc-checkin-switches) |
(let ((switches (vc-switches 'RCS 'checkin))) |
|
(list vc-checkin-switches) |
|
|
vc-checkin-switches))) |
|
308 |
(let ((old-version (vc-workfile-version file)) new-version |
(let ((old-version (vc-workfile-version file)) new-version |
309 |
(default-branch (vc-file-getprop file 'vc-rcs-default-branch))) |
(default-branch (vc-file-getprop file 'vc-rcs-default-branch))) |
310 |
;; Force branch creation if an appropriate |
;; Force branch creation if an appropriate |
357 |
buffer 0 "co" (vc-name file) |
buffer 0 "co" (vc-name file) |
358 |
"-q" ;; suppress diagnostic output |
"-q" ;; suppress diagnostic output |
359 |
(concat "-p" rev) |
(concat "-p" rev) |
360 |
(if (stringp vc-checkout-switches) |
(vc-switches 'RCS 'checkout))) |
|
(list vc-checkout-switches) |
|
|
vc-checkout-switches))) |
|
361 |
|
|
362 |
(defun vc-rcs-checkout (file &optional editable rev) |
(defun vc-rcs-checkout (file &optional editable rev) |
363 |
"Retrieve a copy of a saved version of FILE." |
"Retrieve a copy of a saved version of FILE." |
367 |
(save-excursion |
(save-excursion |
368 |
;; Change buffers to get local value of vc-checkout-switches. |
;; Change buffers to get local value of vc-checkout-switches. |
369 |
(if file-buffer (set-buffer file-buffer)) |
(if file-buffer (set-buffer file-buffer)) |
370 |
(setq switches (if (stringp vc-checkout-switches) |
(setq switches (vc-switches 'RCS 'checkout)) |
|
(list vc-checkout-switches) |
|
|
vc-checkout-switches)) |
|
371 |
;; Save this buffer's default-directory |
;; Save this buffer's default-directory |
372 |
;; and use save-excursion to make sure it is restored |
;; and use save-excursion to make sure it is restored |
373 |
;; in the same buffer it was saved in. |
;; in the same buffer it was saved in. |
414 |
(vc-file-setprop file 'vc-workfile-version new-version) |
(vc-file-setprop file 'vc-workfile-version new-version) |
415 |
;; if necessary, adjust the default branch |
;; if necessary, adjust the default branch |
416 |
(and rev (not (string= rev "")) |
(and rev (not (string= rev "")) |
417 |
(vc-rcs-set-default-branch |
(vc-rcs-set-default-branch |
418 |
file |
file |
419 |
(if (vc-rcs-latest-on-branch-p file new-version) |
(if (vc-rcs-latest-on-branch-p file new-version) |
420 |
(if (vc-trunk-p new-version) nil |
(if (vc-trunk-p new-version) nil |
490 |
(append (list "-q" |
(append (list "-q" |
491 |
(concat "-r" oldvers) |
(concat "-r" oldvers) |
492 |
(and newvers (concat "-r" newvers))) |
(and newvers (concat "-r" newvers))) |
493 |
(vc-diff-switches-list 'RCS)))) |
(vc-switches 'RCS 'diff)))) |
494 |
|
|
495 |
|
|
496 |
;;; |
;;; |