Mercurial > emacs
changeset 95324:51f0a2e341de
(vc-make-backend-object): Fix name.
(vc-dir-show-fileentry): Fix docstring.
(vc-dir-refresh): Use vc-dir-backend. Fix docstring.
(vc-dir-refresh-files): Use vc-dir-backend. Fix docstring. Reset
the state for directories.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Tue, 27 May 2008 00:05:22 +0000 |
parents | 3365a8da5213 |
children | da0363084105 |
files | lisp/ChangeLog lisp/vc.el |
diffstat | 2 files changed, 28 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Tue May 27 00:00:23 2008 +0000 +++ b/lisp/ChangeLog Tue May 27 00:05:22 2008 +0000 @@ -1,7 +1,13 @@ -2008-05-26 Dan Nicolaescu <dann@ics.uci.edu> +2008-05-27 Dan Nicolaescu <dann@ics.uci.edu> * vc.el (Problems): Remove fixed issues. (vc-expand-dirs): Avoid returning directories. + (vc-dir): Fix C-x v v binding. + (vc-make-backend-object): Fix name. + (vc-dir-show-fileentry): Fix docstring. + (vc-dir-refresh): Use vc-dir-backend. Fix docstring. + (vc-dir-refresh-files): Use vc-dir-backend. Fix docstring. Reset + the state for directories. * vc-dispatcher.el (vc-resynch-window): Fix mode-line updating. (vc-dir-menu-map): Fix menu title for the menu bar and the popup menu.
--- a/lisp/vc.el Tue May 27 00:00:23 2008 +0000 +++ b/lisp/vc.el Tue May 27 00:05:22 2008 +0000 @@ -1852,10 +1852,9 @@ nil) (defun vc-dir-refresh-files (files default-state) - "Refresh some files in the VC status buffer." - (let ((backend (vc-responsible-backend default-directory)) - (status-buffer (current-buffer)) - (def-dir default-directory)) + "Refresh some files in the *VC-dir* buffer." + (let ((def-dir default-directory) + (backend vc-dir-backend)) (vc-set-mode-line-busy-indicator) ;; Call the `dir-status-file' backend function. ;; `dir-status-file' is supposed to be asynchronous. @@ -1884,17 +1883,26 @@ ;; file/dir doesn't exist and isn't versioned. (ewoc-filter vc-ewoc (lambda (info) + ;; The state for directory entries might + ;; have been changed to 'up-to-date, + ;; reset it, othewise it will be removed when doing 'x' + ;; next time. + ;; FIXME: There should be a more elegant way to do this. + (when (and (vc-dir-fileinfo->directory info) + (eq (vc-dir-fileinfo->state info) + 'up-to-date)) + (setf (vc-dir-fileinfo->state info) nil)) + (not (vc-dir-fileinfo->needs-update info)))))))))))) (defun vc-dir-refresh () - "Refresh the contents of the VC status buffer. + "Refresh the contents of the *VC-dir* buffer. Throw an error if another update process is in progress." (interactive) (if (vc-dir-busy) (error "Another update process is in progress, cannot run two at a time") - (let ((backend (vc-responsible-backend default-directory)) - (status-buffer (current-buffer)) - (def-dir default-directory)) + (let ((def-dir default-directory) + (backend vc-dir-backend)) (vc-set-mode-line-busy-indicator) ;; Call the `dir-status' backend function. ;; `dir-status' is supposed to be asynchronous. @@ -1936,7 +1944,7 @@ (setq mode-line-process nil)))))))))))) (defun vc-dir-show-fileentry (file) - "Insert an entry for a specific file into the current VC status listing. + "Insert an entry for a specific file into the current *VC-dir* listing. This is typically used if the file is up-to-date (or has been added outside of VC) and one wants to do some operation on it." (interactive "fShow file: ") @@ -1960,9 +1968,6 @@ "Default absence of extra information returned for a file." nil) -(defvar vc-dir-backend nil - "The backend used by the current *vc-dir* buffer.") - ;; FIXME: Replace these with a more efficient dispatch (defun vc-generic-status-printer (fileentry) @@ -1980,7 +1985,7 @@ (defun vc-make-backend-object (file-or-dir) "Create the backend capability object needed by vc-dispatcher." (vc-create-client-object - "VC status" + "VC dir" (vc-dir-headers vc-dir-backend file-or-dir) #'vc-generic-status-printer #'vc-generic-state @@ -2003,7 +2008,7 @@ ;; FIXME: Make a derived-mode instead. ;; Add VC-specific keybindings (let ((map (current-local-map))) - (define-key map "v" 'vc-diff) ;; C-x v v + (define-key map "v" 'vc-next-action) ;; C-x v v (define-key map "=" 'vc-diff) ;; C-x v = (define-key map "i" 'vc-dir-register) ;; C-x v i (define-key map "+" 'vc-update) ;; C-x v + @@ -2585,7 +2590,9 @@ (defun vc-default-init-revision (backend) vc-default-init-revision) (defalias 'vc-cvs-update-changelog 'vc-update-changelog-rcs2log) + (defalias 'vc-rcs-update-changelog 'vc-update-changelog-rcs2log) + ;; FIXME: This should probably be moved to vc-rcs.el and replaced in ;; vc-cvs.el by code using cvs2cl. (defun vc-update-changelog-rcs2log (files)