/[emacs]/emacs/lisp/vc-mcvs.el
ViewVC logotype

Diff of /emacs/lisp/vc-mcvs.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by monnier, Fri May 9 14:35:51 2003 UTC revision 1.8 by monnier, Fri May 9 17:05:40 2003 UTC
# Line 177  This is only meaningful if you don't use Line 177  This is only meaningful if you don't use
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.
# Line 196  This is only meaningful if you don't use Line 196  This is only meaningful if you don't use
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
# Line 282  This is only possible if Meta-CVS is res Line 282  This is only possible if Meta-CVS is res
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))
# Line 440  The changes are between FIRST-VERSION an Line 442  The changes are between FIRST-VERSION an
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)
# Line 457  The changes are between FIRST-VERSION an Line 459  The changes are between FIRST-VERSION an
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)
# Line 471  The changes are between FIRST-VERSION an Line 473  The changes are between FIRST-VERSION an
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
# Line 496  The changes are between FIRST-VERSION an Line 498  The changes are between FIRST-VERSION an
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)
# Line 554  If UPDATE is non-nil, then update (resyn Line 556  If UPDATE is non-nil, then update (resyn
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    
# Line 584  and that it passes `vc-mcvs-global-switc Line 586  and that it passes `vc-mcvs-global-switc
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."

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26