diff options
| author | Dan Nicolaescu | 2008-05-27 00:05:22 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2008-05-27 00:05:22 +0000 |
| commit | 476b4d351826011835e82a2736eacc81958de272 (patch) | |
| tree | f93a759c0196c18920c024ba1b575f518a6b0c80 | |
| parent | 90404d5ab026a745fdd9704cf51a46d6bf4f0bbc (diff) | |
| download | emacs-476b4d351826011835e82a2736eacc81958de272.tar.gz emacs-476b4d351826011835e82a2736eacc81958de272.zip | |
(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.
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/vc.el | 35 |
2 files changed, 28 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f590dad8196..f1f0a3a14d9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,7 +1,13 @@ | |||
| 1 | 2008-05-26 Dan Nicolaescu <dann@ics.uci.edu> | 1 | 2008-05-27 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 2 | ||
| 3 | * vc.el (Problems): Remove fixed issues. | 3 | * vc.el (Problems): Remove fixed issues. |
| 4 | (vc-expand-dirs): Avoid returning directories. | 4 | (vc-expand-dirs): Avoid returning directories. |
| 5 | (vc-dir): Fix C-x v v binding. | ||
| 6 | (vc-make-backend-object): Fix name. | ||
| 7 | (vc-dir-show-fileentry): Fix docstring. | ||
| 8 | (vc-dir-refresh): Use vc-dir-backend. Fix docstring. | ||
| 9 | (vc-dir-refresh-files): Use vc-dir-backend. Fix docstring. Reset | ||
| 10 | the state for directories. | ||
| 5 | 11 | ||
| 6 | * vc-dispatcher.el (vc-resynch-window): Fix mode-line updating. | 12 | * vc-dispatcher.el (vc-resynch-window): Fix mode-line updating. |
| 7 | (vc-dir-menu-map): Fix menu title for the menu bar and the popup menu. | 13 | (vc-dir-menu-map): Fix menu title for the menu bar and the popup menu. |
diff --git a/lisp/vc.el b/lisp/vc.el index 41818576cb4..77a72f56962 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -1852,10 +1852,9 @@ specific headers." | |||
| 1852 | nil) | 1852 | nil) |
| 1853 | 1853 | ||
| 1854 | (defun vc-dir-refresh-files (files default-state) | 1854 | (defun vc-dir-refresh-files (files default-state) |
| 1855 | "Refresh some files in the VC status buffer." | 1855 | "Refresh some files in the *VC-dir* buffer." |
| 1856 | (let ((backend (vc-responsible-backend default-directory)) | 1856 | (let ((def-dir default-directory) |
| 1857 | (status-buffer (current-buffer)) | 1857 | (backend vc-dir-backend)) |
| 1858 | (def-dir default-directory)) | ||
| 1859 | (vc-set-mode-line-busy-indicator) | 1858 | (vc-set-mode-line-busy-indicator) |
| 1860 | ;; Call the `dir-status-file' backend function. | 1859 | ;; Call the `dir-status-file' backend function. |
| 1861 | ;; `dir-status-file' is supposed to be asynchronous. | 1860 | ;; `dir-status-file' is supposed to be asynchronous. |
| @@ -1884,17 +1883,26 @@ specific headers." | |||
| 1884 | ;; file/dir doesn't exist and isn't versioned. | 1883 | ;; file/dir doesn't exist and isn't versioned. |
| 1885 | (ewoc-filter vc-ewoc | 1884 | (ewoc-filter vc-ewoc |
| 1886 | (lambda (info) | 1885 | (lambda (info) |
| 1886 | ;; The state for directory entries might | ||
| 1887 | ;; have been changed to 'up-to-date, | ||
| 1888 | ;; reset it, othewise it will be removed when doing 'x' | ||
| 1889 | ;; next time. | ||
| 1890 | ;; FIXME: There should be a more elegant way to do this. | ||
| 1891 | (when (and (vc-dir-fileinfo->directory info) | ||
| 1892 | (eq (vc-dir-fileinfo->state info) | ||
| 1893 | 'up-to-date)) | ||
| 1894 | (setf (vc-dir-fileinfo->state info) nil)) | ||
| 1895 | |||
| 1887 | (not (vc-dir-fileinfo->needs-update info)))))))))))) | 1896 | (not (vc-dir-fileinfo->needs-update info)))))))))))) |
| 1888 | 1897 | ||
| 1889 | (defun vc-dir-refresh () | 1898 | (defun vc-dir-refresh () |
| 1890 | "Refresh the contents of the VC status buffer. | 1899 | "Refresh the contents of the *VC-dir* buffer. |
| 1891 | Throw an error if another update process is in progress." | 1900 | Throw an error if another update process is in progress." |
| 1892 | (interactive) | 1901 | (interactive) |
| 1893 | (if (vc-dir-busy) | 1902 | (if (vc-dir-busy) |
| 1894 | (error "Another update process is in progress, cannot run two at a time") | 1903 | (error "Another update process is in progress, cannot run two at a time") |
| 1895 | (let ((backend (vc-responsible-backend default-directory)) | 1904 | (let ((def-dir default-directory) |
| 1896 | (status-buffer (current-buffer)) | 1905 | (backend vc-dir-backend)) |
| 1897 | (def-dir default-directory)) | ||
| 1898 | (vc-set-mode-line-busy-indicator) | 1906 | (vc-set-mode-line-busy-indicator) |
| 1899 | ;; Call the `dir-status' backend function. | 1907 | ;; Call the `dir-status' backend function. |
| 1900 | ;; `dir-status' is supposed to be asynchronous. | 1908 | ;; `dir-status' is supposed to be asynchronous. |
| @@ -1936,7 +1944,7 @@ Throw an error if another update process is in progress." | |||
| 1936 | (setq mode-line-process nil)))))))))))) | 1944 | (setq mode-line-process nil)))))))))))) |
| 1937 | 1945 | ||
| 1938 | (defun vc-dir-show-fileentry (file) | 1946 | (defun vc-dir-show-fileentry (file) |
| 1939 | "Insert an entry for a specific file into the current VC status listing. | 1947 | "Insert an entry for a specific file into the current *VC-dir* listing. |
| 1940 | This is typically used if the file is up-to-date (or has been added | 1948 | This is typically used if the file is up-to-date (or has been added |
| 1941 | outside of VC) and one wants to do some operation on it." | 1949 | outside of VC) and one wants to do some operation on it." |
| 1942 | (interactive "fShow file: ") | 1950 | (interactive "fShow file: ") |
| @@ -1960,9 +1968,6 @@ outside of VC) and one wants to do some operation on it." | |||
| 1960 | "Default absence of extra information returned for a file." | 1968 | "Default absence of extra information returned for a file." |
| 1961 | nil) | 1969 | nil) |
| 1962 | 1970 | ||
| 1963 | (defvar vc-dir-backend nil | ||
| 1964 | "The backend used by the current *vc-dir* buffer.") | ||
| 1965 | |||
| 1966 | ;; FIXME: Replace these with a more efficient dispatch | 1971 | ;; FIXME: Replace these with a more efficient dispatch |
| 1967 | 1972 | ||
| 1968 | (defun vc-generic-status-printer (fileentry) | 1973 | (defun vc-generic-status-printer (fileentry) |
| @@ -1980,7 +1985,7 @@ outside of VC) and one wants to do some operation on it." | |||
| 1980 | (defun vc-make-backend-object (file-or-dir) | 1985 | (defun vc-make-backend-object (file-or-dir) |
| 1981 | "Create the backend capability object needed by vc-dispatcher." | 1986 | "Create the backend capability object needed by vc-dispatcher." |
| 1982 | (vc-create-client-object | 1987 | (vc-create-client-object |
| 1983 | "VC status" | 1988 | "VC dir" |
| 1984 | (vc-dir-headers vc-dir-backend file-or-dir) | 1989 | (vc-dir-headers vc-dir-backend file-or-dir) |
| 1985 | #'vc-generic-status-printer | 1990 | #'vc-generic-status-printer |
| 1986 | #'vc-generic-state | 1991 | #'vc-generic-state |
| @@ -2003,7 +2008,7 @@ outside of VC) and one wants to do some operation on it." | |||
| 2003 | ;; FIXME: Make a derived-mode instead. | 2008 | ;; FIXME: Make a derived-mode instead. |
| 2004 | ;; Add VC-specific keybindings | 2009 | ;; Add VC-specific keybindings |
| 2005 | (let ((map (current-local-map))) | 2010 | (let ((map (current-local-map))) |
| 2006 | (define-key map "v" 'vc-diff) ;; C-x v v | 2011 | (define-key map "v" 'vc-next-action) ;; C-x v v |
| 2007 | (define-key map "=" 'vc-diff) ;; C-x v = | 2012 | (define-key map "=" 'vc-diff) ;; C-x v = |
| 2008 | (define-key map "i" 'vc-dir-register) ;; C-x v i | 2013 | (define-key map "i" 'vc-dir-register) ;; C-x v i |
| 2009 | (define-key map "+" 'vc-update) ;; C-x v + | 2014 | (define-key map "+" 'vc-update) ;; C-x v + |
| @@ -2585,7 +2590,9 @@ editing non-current revisions is not supported by default." | |||
| 2585 | (defun vc-default-init-revision (backend) vc-default-init-revision) | 2590 | (defun vc-default-init-revision (backend) vc-default-init-revision) |
| 2586 | 2591 | ||
| 2587 | (defalias 'vc-cvs-update-changelog 'vc-update-changelog-rcs2log) | 2592 | (defalias 'vc-cvs-update-changelog 'vc-update-changelog-rcs2log) |
| 2593 | |||
| 2588 | (defalias 'vc-rcs-update-changelog 'vc-update-changelog-rcs2log) | 2594 | (defalias 'vc-rcs-update-changelog 'vc-update-changelog-rcs2log) |
| 2595 | |||
| 2589 | ;; FIXME: This should probably be moved to vc-rcs.el and replaced in | 2596 | ;; FIXME: This should probably be moved to vc-rcs.el and replaced in |
| 2590 | ;; vc-cvs.el by code using cvs2cl. | 2597 | ;; vc-cvs.el by code using cvs2cl. |
| 2591 | (defun vc-update-changelog-rcs2log (files) | 2598 | (defun vc-update-changelog-rcs2log (files) |