diff options
author | Dan Nicolaescu <dann@ics.uci.edu> | 2009-06-23 06:35:40 +0000 |
---|---|---|
committer | Dan Nicolaescu <dann@ics.uci.edu> | 2009-06-23 06:35:40 +0000 |
commit | 77bf3f54522f792ec1573ab2595652252ea8cecd (patch) | |
tree | e840317e5ccee1aca58c39c7024a8be7a8279399 /lisp/vc-cvs.el | |
parent | 2764748c42990b0b80d7c641e821ed03d6dabfc7 (diff) | |
download | emacs-77bf3f54522f792ec1573ab2595652252ea8cecd.tar.gz emacs-77bf3f54522f792ec1573ab2595652252ea8cecd.tar.bz2 emacs-77bf3f54522f792ec1573ab2595652252ea8cecd.zip |
* vc-hooks.el (vc-stay-local-p, vc-state, vc-working-revision):
Add an optional argument for the backend, use it instead of
calling vc-backend.
(vc-mode-line): Add an optional argument for the backend. Pass
the backend to vc-state and vc-working-revision. Move code for
special handling for vc-state being a buffer to ...
* vc-rcs.el (vc-rcs-find-file-hook):
* vc-sccs.el (vc-sccs-find-file-hook): ... here. New functions.
* vc-svn.el (vc-svn-state, vc-svn-dir-status, vc-svn-checkout)
(vc-svn-print-log, vc-svn-diff): Pass 'SVN to vc-state,
vc-stay-local-p and vc-mode-line calls.
* vc-cvs.el (vc-cvs-state, vc-cvs-checkout, vc-cvs-print-log)
(vc-cvs-diff, vc-cvs-annotate-command)
(vc-cvs-make-version-backups-p, vc-cvs-stay-local-p)
(vc-cvs-dir-status): Pass 'CVS to vc-state, vc-stay-local-p and
vc-mode-line calls.
* vc.el (vc-deduce-fileset): Use vc-deduce-fileset instead of
direct comparison.
(vc-next-action, vc-transfer-file, vc-rename-file): Also pass the
backend when calling vc-mode-line.
(vc-register): Do not create a closure for calling the vc register
function, call it directly.
Diffstat (limited to 'lisp/vc-cvs.el')
-rw-r--r-- | lisp/vc-cvs.el | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el index 50a4e281d81..c3f94dc2a15 100644 --- a/lisp/vc-cvs.el +++ b/lisp/vc-cvs.el @@ -216,7 +216,7 @@ See also variable `vc-cvs-sticky-date-format-string'." (defun vc-cvs-state (file) "CVS-specific version of `vc-state'." - (if (vc-stay-local-p file) + (if (vc-stay-local-p file 'CVS) (let ((state (vc-file-getprop file 'vc-state))) ;; If we should stay local, use the heuristic but only if ;; we don't have a more precise state already available. @@ -402,7 +402,7 @@ REV is the revision to check out." "-A" (concat "-r" rev)))) (vc-switches 'CVS 'checkout))) - (vc-mode-line file)) + (vc-mode-line file 'CVS)) (message "Checking out %s...done" file)) (defun vc-cvs-delete-file (file) @@ -496,7 +496,7 @@ Will fail unless you have administrative privileges on the repo." ;; It's just the catenation of the individual logs. (vc-cvs-command buffer - (if (vc-stay-local-p files) 'async 0) + (if (vc-stay-local-p files 'CVS) 'async 0) files "log")) (defun vc-cvs-comment-history (file) @@ -506,7 +506,7 @@ Will fail unless you have administrative privileges on the repo." (defun vc-cvs-diff (files &optional oldvers newvers buffer) "Get a difference report using CVS between two revisions of FILE." (let* ((async (and (not vc-disable-async-diff) - (vc-stay-local-p files))) + (vc-stay-local-p files 'CVS))) (invoke-cvs-diff-list nil) status) ;; Look through the file list and see if any files have backups @@ -559,7 +559,7 @@ Will fail unless you have administrative privileges on the repo." "Execute \"cvs annotate\" on FILE, inserting the contents in BUFFER. Optional arg REVISION is a revision to annotate from." (vc-cvs-command buffer - (if (vc-stay-local-p file) + (if (vc-stay-local-p file 'CVS) 'async 0) file "annotate" (if revision (concat "-r" revision))) @@ -681,8 +681,9 @@ If UPDATE is non-nil, then update (resynch) any affected buffers." ;;; Miscellaneous ;;; -(defalias 'vc-cvs-make-version-backups-p 'vc-stay-local-p - "Return non-nil if version backups should be made for FILE.") +(defun vc-cvs-make-version-backups-p (file) + "Return non-nil if version backups should be made for FILE." + (vc-stay-local-p file 'CVS)) (defun vc-cvs-check-headers () "Check if the current file has any headers in it." @@ -706,7 +707,8 @@ and that it passes `vc-cvs-global-switches' to it before FLAGS." (append vc-cvs-global-switches flags)))) -(defalias 'vc-cvs-stay-local-p 'vc-stay-local-p) ;Back-compatibility. +(defun vc-cvs-stay-local-p (file) ;Back-compatibility. + (vc-stay-local-p file 'CVS)) (defun vc-cvs-repository-hostname (dirname) "Hostname of the CVS server associated to workarea DIRNAME." @@ -965,7 +967,7 @@ state." (defun vc-cvs-dir-status (dir update-function) "Create a list of conses (file . state) for DIR." ;; FIXME check all files in DIR instead? - (let ((local (vc-stay-local-p dir))) + (let ((local (vc-stay-local-p dir 'CVS))) (if (and local (not (eq local 'only-file))) (vc-cvs-dir-status-heuristic dir update-function) (vc-cvs-command (current-buffer) 'async dir "-f" "status") |