aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2003-05-09 17:05:40 +0000
committerStefan Monnier2003-05-09 17:05:40 +0000
commitd699c8e2cf7b1f88803127ee3595f2aaf9520bc5 (patch)
treecb8c364905938ef57d1318d8537b0eab814a877d
parent7ffc77d367eff5e8bc16a36a7cfaacf67ddde6e1 (diff)
downloademacs-d699c8e2cf7b1f88803127ee3595f2aaf9520bc5.tar.gz
emacs-d699c8e2cf7b1f88803127ee3595f2aaf9520bc5.zip
(vc-mcvs-stay-local): Remove unused var.
(vc-mcvs-state, vc-mcvs-dir-state, vc-mcvs-print-log, vc-mcvs-diff) (vc-mcvs-diff-tree, vc-mcvs-annotate-command) (vc-mcvs-make-version-backups-p): Use vc-stay-local-p. (vc-mcvs-checkin): Disallow commits to a numbered rev. (vc-mcvs-repository-hostname): New function. (vc-mcvs-stay-local-p): Remove.
-rw-r--r--lisp/vc-mcvs.el25
1 files changed, 14 insertions, 11 deletions
diff --git a/lisp/vc-mcvs.el b/lisp/vc-mcvs.el
index b8b79a22d47..b2c4a9aef2e 100644
--- a/lisp/vc-mcvs.el
+++ b/lisp/vc-mcvs.el
@@ -177,7 +177,7 @@ This is only meaningful if you don't use the implicit checkout model
177 ;; This would assume the Meta-CVS sandbox is synchronized. 177 ;; This would assume the Meta-CVS sandbox is synchronized.
178 ;; (vc-mcvs-cvs state file)) 178 ;; (vc-mcvs-cvs state file))
179 "Meta-CVS-specific version of `vc-state'." 179 "Meta-CVS-specific version of `vc-state'."
180 (if (vc-mcvs-stay-local-p file) 180 (if (vc-stay-local-p file)
181 (let ((state (vc-file-getprop file 'vc-state))) 181 (let ((state (vc-file-getprop file 'vc-state)))
182 ;; If we should stay local, use the heuristic but only if 182 ;; If we should stay local, use the heuristic but only if
183 ;; we don't have a more precise state already available. 183 ;; we don't have a more precise state already available.
@@ -196,7 +196,7 @@ This is only meaningful if you don't use the implicit checkout model
196 "Find the Meta-CVS state of all files in DIR." 196 "Find the Meta-CVS state of all files in DIR."
197 ;; if DIR is not under Meta-CVS control, don't do anything. 197 ;; if DIR is not under Meta-CVS control, don't do anything.
198 (when (file-readable-p (expand-file-name "MCVS/CVS/Entries" dir)) 198 (when (file-readable-p (expand-file-name "MCVS/CVS/Entries" dir))
199 (if (vc-mcvs-stay-local-p dir) 199 (if (vc-stay-local-p dir)
200 (vc-mcvs-dir-state-heuristic dir) 200 (vc-mcvs-dir-state-heuristic dir)
201 (let ((default-directory dir)) 201 (let ((default-directory dir))
202 ;; Don't specify DIR in this command, the default-directory is 202 ;; Don't specify DIR in this command, the default-directory is
@@ -282,15 +282,17 @@ This is only possible if Meta-CVS is responsible for FILE's directory.")
282 (unless (or (not rev) (vc-mcvs-valid-version-number-p rev)) 282 (unless (or (not rev) (vc-mcvs-valid-version-number-p rev))
283 (if (not (vc-mcvs-valid-symbolic-tag-name-p rev)) 283 (if (not (vc-mcvs-valid-symbolic-tag-name-p rev))
284 (error "%s is not a valid symbolic tag name" rev) 284 (error "%s is not a valid symbolic tag name" rev)
285 ;; If the input revison is a valid symbolic tag name, we create it 285 ;; If the input revision is a valid symbolic tag name, we create it
286 ;; as a branch, commit and switch to it. 286 ;; as a branch, commit and switch to it.
287 (apply 'vc-mcvs-command nil 0 file "tag" "-b" (list rev)) 287 (apply 'vc-mcvs-command nil 0 file "tag" "-b" (list rev))
288 (apply 'vc-mcvs-command nil 0 file "update" "-r" (list rev)) 288 (apply 'vc-mcvs-command nil 0 file "update" "-r" (list rev))
289 (vc-file-setprop file 'vc-mcvs-sticky-tag rev) 289 (vc-file-setprop file 'vc-mcvs-sticky-tag rev)
290 (setq rev nil))) 290 (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"))
291 (let ((status (apply 'vc-mcvs-command nil 1 file 294 (let ((status (apply 'vc-mcvs-command nil 1 file
292 "ci" (if rev (concat "-r" rev)) 295 "ci" "-m" comment
293 "-m" comment
294 (vc-switches 'MCVS 'checkin)))) 296 (vc-switches 'MCVS 'checkin))))
295 (set-buffer "*vc*") 297 (set-buffer "*vc*")
296 (goto-char (point-min)) 298 (goto-char (point-min))
@@ -440,7 +442,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
440 "Get change log associated with FILE." 442 "Get change log associated with FILE."
441 (vc-mcvs-command 443 (vc-mcvs-command
442 nil 444 nil
443 (if (and (vc-mcvs-stay-local-p file) (fboundp 'start-process)) 'async 0) 445 (if (and (vc-stay-local-p file) (fboundp 'start-process)) 'async 0)
444 file "log")) 446 file "log"))
445 447
446(defun vc-mcvs-diff (file &optional oldvers newvers) 448(defun vc-mcvs-diff (file &optional oldvers newvers)
@@ -457,7 +459,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
457 (append (vc-switches nil 'diff) '("/dev/null"))) 459 (append (vc-switches nil 'diff) '("/dev/null")))
458 ;; Even if it's empty, it's locally modified. 460 ;; Even if it's empty, it's locally modified.
459 1) 461 1)
460 (let* ((async (and (vc-mcvs-stay-local-p file) (fboundp 'start-process))) 462 (let* ((async (and (vc-stay-local-p file) (fboundp 'start-process)))
461 (status 463 (status
462 (apply 'vc-mcvs-command "*vc-diff*" 464 (apply 'vc-mcvs-command "*vc-diff*"
463 (if async 'async 1) 465 (if async 'async 1)
@@ -471,7 +473,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
471 "Diff all files at and below DIR." 473 "Diff all files at and below DIR."
472 (with-current-buffer "*vc-diff*" 474 (with-current-buffer "*vc-diff*"
473 (setq default-directory dir) 475 (setq default-directory dir)
474 (if (vc-mcvs-stay-local-p dir) 476 (if (vc-stay-local-p dir)
475 ;; local diff: do it filewise, and only for files that are modified 477 ;; local diff: do it filewise, and only for files that are modified
476 (vc-file-tree-walk 478 (vc-file-tree-walk
477 dir 479 dir
@@ -496,7 +498,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
496Optional arg VERSION is a version to annotate from." 498Optional arg VERSION is a version to annotate from."
497 (vc-mcvs-command 499 (vc-mcvs-command
498 buffer 500 buffer
499 (if (and (vc-mcvs-stay-local-p file) (fboundp 'start-process)) 'async 0) 501 (if (and (vc-stay-local-p file) (fboundp 'start-process)) 'async 0)
500 file "annotate" (if version (concat "-r" version)))) 502 file "annotate" (if version (concat "-r" version))))
501 503
502(defalias 'vc-mcvs-annotate-current-time 'vc-cvs-annotate-current-time) 504(defalias 'vc-mcvs-annotate-current-time 'vc-cvs-annotate-current-time)
@@ -554,7 +556,7 @@ If UPDATE is non-nil, then update (resynch) any affected buffers."
554;;; Miscellaneous 556;;; Miscellaneous
555;;; 557;;;
556 558
557(defalias 'vc-mcvs-make-version-backups-p 'vc-mcvs-stay-local-p 559(defalias 'vc-mcvs-make-version-backups-p 'vc-stay-local-p
558 "Return non-nil if version backups should be made for FILE.") 560 "Return non-nil if version backups should be made for FILE.")
559(defalias 'vc-mcvs-check-headers 'vc-cvs-check-headers) 561(defalias 'vc-mcvs-check-headers 'vc-cvs-check-headers)
560 562
@@ -584,7 +586,8 @@ and that it passes `vc-mcvs-global-switches' to it before FLAGS."
584 " | mcvs filt")) 586 " | mcvs filt"))
585 (apply 'vc-do-command buffer okstatus "mcvs" file args)))) 587 (apply 'vc-do-command buffer okstatus "mcvs" file args))))
586 588
587(defun vc-mcvs-stay-local-p (file) (vc-mcvs-cvs stay-local-p file)) 589(defun vc-mcvs-repository-hostname (dirname)
590 (vc-cvs-repository-hostname (vc-mcvs-root dirname)))
588 591
589(defun vc-mcvs-dir-state-heuristic (dir) 592(defun vc-mcvs-dir-state-heuristic (dir)
590 "Find the Meta-CVS state of all files in DIR, using only local information." 593 "Find the Meta-CVS state of all files in DIR, using only local information."