177 |
;; This would assume the Meta-CVS sandbox is synchronized. |
;; This would assume the Meta-CVS sandbox is synchronized. |
178 |
;; (vc-mcvs-cvs state file)) |
;; (vc-mcvs-cvs state file)) |
179 |
"Meta-CVS-specific version of `vc-state'." |
"Meta-CVS-specific version of `vc-state'." |
180 |
(if (vc-mcvs-stay-local-p file) |
(if (vc-stay-local-p file) |
181 |
(let ((state (vc-file-getprop file 'vc-state))) |
(let ((state (vc-file-getprop file 'vc-state))) |
182 |
;; If we should stay local, use the heuristic but only if |
;; If we should stay local, use the heuristic but only if |
183 |
;; we don't have a more precise state already available. |
;; we don't have a more precise state already available. |
196 |
"Find the Meta-CVS state of all files in DIR." |
"Find the Meta-CVS state of all files in DIR." |
197 |
;; if DIR is not under Meta-CVS control, don't do anything. |
;; if DIR is not under Meta-CVS control, don't do anything. |
198 |
(when (file-readable-p (expand-file-name "MCVS/CVS/Entries" dir)) |
(when (file-readable-p (expand-file-name "MCVS/CVS/Entries" dir)) |
199 |
(if (vc-mcvs-stay-local-p dir) |
(if (vc-stay-local-p dir) |
200 |
(vc-mcvs-dir-state-heuristic dir) |
(vc-mcvs-dir-state-heuristic dir) |
201 |
(let ((default-directory dir)) |
(let ((default-directory dir)) |
202 |
;; Don't specify DIR in this command, the default-directory is |
;; Don't specify DIR in this command, the default-directory is |
282 |
(unless (or (not rev) (vc-mcvs-valid-version-number-p rev)) |
(unless (or (not rev) (vc-mcvs-valid-version-number-p rev)) |
283 |
(if (not (vc-mcvs-valid-symbolic-tag-name-p rev)) |
(if (not (vc-mcvs-valid-symbolic-tag-name-p rev)) |
284 |
(error "%s is not a valid symbolic tag name" rev) |
(error "%s is not a valid symbolic tag name" rev) |
285 |
;; If the input revison is a valid symbolic tag name, we create it |
;; If the input revision is a valid symbolic tag name, we create it |
286 |
;; as a branch, commit and switch to it. |
;; as a branch, commit and switch to it. |
287 |
(apply 'vc-mcvs-command nil 0 file "tag" "-b" (list rev)) |
(apply 'vc-mcvs-command nil 0 file "tag" "-b" (list rev)) |
288 |
(apply 'vc-mcvs-command nil 0 file "update" "-r" (list rev)) |
(apply 'vc-mcvs-command nil 0 file "update" "-r" (list rev)) |
289 |
(vc-file-setprop file 'vc-mcvs-sticky-tag rev) |
(vc-file-setprop file 'vc-mcvs-sticky-tag rev) |
290 |
(setq rev nil))) |
(setq rev nil))) |
291 |
|
;; This commit might cvs-commit several files (e.g. MAP and TYPES) |
292 |
|
;; so using numbered revs here is dangerous and somewhat meaningless. |
293 |
|
(when rev (error "Cannot commit to a specific revision number")) |
294 |
(let ((status (apply 'vc-mcvs-command nil 1 file |
(let ((status (apply 'vc-mcvs-command nil 1 file |
295 |
"ci" (if rev (concat "-r" rev)) |
"ci" "-m" comment |
|
"-m" comment |
|
296 |
(vc-switches 'MCVS 'checkin)))) |
(vc-switches 'MCVS 'checkin)))) |
297 |
(set-buffer "*vc*") |
(set-buffer "*vc*") |
298 |
(goto-char (point-min)) |
(goto-char (point-min)) |
442 |
"Get change log associated with FILE." |
"Get change log associated with FILE." |
443 |
(vc-mcvs-command |
(vc-mcvs-command |
444 |
nil |
nil |
445 |
(if (and (vc-mcvs-stay-local-p file) (fboundp 'start-process)) 'async 0) |
(if (and (vc-stay-local-p file) (fboundp 'start-process)) 'async 0) |
446 |
file "log")) |
file "log")) |
447 |
|
|
448 |
(defun vc-mcvs-diff (file &optional oldvers newvers) |
(defun vc-mcvs-diff (file &optional oldvers newvers) |
459 |
(append (vc-switches nil 'diff) '("/dev/null"))) |
(append (vc-switches nil 'diff) '("/dev/null"))) |
460 |
;; Even if it's empty, it's locally modified. |
;; Even if it's empty, it's locally modified. |
461 |
1) |
1) |
462 |
(let* ((async (and (vc-mcvs-stay-local-p file) (fboundp 'start-process))) |
(let* ((async (and (vc-stay-local-p file) (fboundp 'start-process))) |
463 |
(status |
(status |
464 |
(apply 'vc-mcvs-command "*vc-diff*" |
(apply 'vc-mcvs-command "*vc-diff*" |
465 |
(if async 'async 1) |
(if async 'async 1) |
473 |
"Diff all files at and below DIR." |
"Diff all files at and below DIR." |
474 |
(with-current-buffer "*vc-diff*" |
(with-current-buffer "*vc-diff*" |
475 |
(setq default-directory dir) |
(setq default-directory dir) |
476 |
(if (vc-mcvs-stay-local-p dir) |
(if (vc-stay-local-p dir) |
477 |
;; local diff: do it filewise, and only for files that are modified |
;; local diff: do it filewise, and only for files that are modified |
478 |
(vc-file-tree-walk |
(vc-file-tree-walk |
479 |
dir |
dir |
498 |
Optional arg VERSION is a version to annotate from." |
Optional arg VERSION is a version to annotate from." |
499 |
(vc-mcvs-command |
(vc-mcvs-command |
500 |
buffer |
buffer |
501 |
(if (and (vc-mcvs-stay-local-p file) (fboundp 'start-process)) 'async 0) |
(if (and (vc-stay-local-p file) (fboundp 'start-process)) 'async 0) |
502 |
file "annotate" (if version (concat "-r" version)))) |
file "annotate" (if version (concat "-r" version)))) |
503 |
|
|
504 |
(defalias 'vc-mcvs-annotate-current-time 'vc-cvs-annotate-current-time) |
(defalias 'vc-mcvs-annotate-current-time 'vc-cvs-annotate-current-time) |
556 |
;;; Miscellaneous |
;;; Miscellaneous |
557 |
;;; |
;;; |
558 |
|
|
559 |
(defalias 'vc-mcvs-make-version-backups-p 'vc-mcvs-stay-local-p |
(defalias 'vc-mcvs-make-version-backups-p 'vc-stay-local-p |
560 |
"Return non-nil if version backups should be made for FILE.") |
"Return non-nil if version backups should be made for FILE.") |
561 |
(defalias 'vc-mcvs-check-headers 'vc-cvs-check-headers) |
(defalias 'vc-mcvs-check-headers 'vc-cvs-check-headers) |
562 |
|
|
586 |
" | mcvs filt")) |
" | mcvs filt")) |
587 |
(apply 'vc-do-command buffer okstatus "mcvs" file args)))) |
(apply 'vc-do-command buffer okstatus "mcvs" file args)))) |
588 |
|
|
589 |
(defun vc-mcvs-stay-local-p (file) (vc-mcvs-cvs stay-local-p file)) |
(defun vc-mcvs-repository-hostname (dirname) |
590 |
|
(vc-cvs-repository-hostname (vc-mcvs-root dirname))) |
591 |
|
|
592 |
(defun vc-mcvs-dir-state-heuristic (dir) |
(defun vc-mcvs-dir-state-heuristic (dir) |
593 |
"Find the Meta-CVS state of all files in DIR, using only local information." |
"Find the Meta-CVS state of all files in DIR, using only local information." |