mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-24 07:20:37 +00:00
* vc.el (vc-exec-after): Move setting mode-line-process in the
busy case ... (vc-set-mode-line-busy-indicator): ... in this new function. (vc-status-refresh): Call vc-set-mode-line-busy-indicator. (vc-update-vc-status-buffer): Reset mode-line-process. (vc-status-mark-all-files, vc-status-unmark-all-files): Change to mark/unmark all the files with the same state as the current one. With a prefix argument mark/unmark all files. (vc-status-mode-menu): Adjust strings. (vc-update-vc-status-buffer): Only do something when the argument is not nil. (vc-status-kill-dir-status-process): New function. (vc-status-mode-map): Bind it. (vc-status-process-buffer): New variable. (vc-status-mode): Make it local. (vc-status-refresh): Set it. * vc-hg.el (vc-hg-dir-status): * vc-git.el (vc-git-dir-status): * vc-svn.el (vc-svn-dir-status): Return the buffer in which the command is run.
This commit is contained in:
parent
4dd7de9aaf
commit
751c9f0042
@ -9,6 +9,18 @@
|
||||
mark/unmark all the files with the same state as the current one.
|
||||
With a prefix argument mark/unmark all files.
|
||||
(vc-status-mode-menu): Adjust strings.
|
||||
(vc-update-vc-status-buffer): Only do something when the argument
|
||||
is not nil.
|
||||
(vc-status-kill-dir-status-process): New function.
|
||||
(vc-status-mode-map): Bind it.
|
||||
(vc-status-process-buffer): New variable.
|
||||
(vc-status-mode): Make it local.
|
||||
(vc-status-refresh): Set it.
|
||||
|
||||
* vc-hg.el (vc-hg-dir-status):
|
||||
* vc-git.el (vc-git-dir-status):
|
||||
* vc-svn.el (vc-svn-dir-status): Return the buffer in which the
|
||||
command is run.
|
||||
|
||||
2008-02-22 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
|
@ -252,7 +252,8 @@
|
||||
"--directory"
|
||||
"--exclude-per-directory=.gitignore")
|
||||
(vc-exec-after
|
||||
`(vc-git-after-dir-status (quote ,update-function) ,status-buffer))))
|
||||
`(vc-git-after-dir-status (quote ,update-function) ,status-buffer))
|
||||
(current-buffer)))
|
||||
|
||||
;;; STATE-CHANGING FUNCTIONS
|
||||
|
||||
|
@ -518,7 +518,8 @@ REV is the revision to check out into WORKFILE."
|
||||
(erase-buffer)
|
||||
(vc-hg-command (current-buffer) 'async dir "status")
|
||||
(vc-exec-after
|
||||
`(vc-hg-after-dir-status (quote ,update-function) ,status-buffer))))
|
||||
`(vc-hg-after-dir-status (quote ,update-function) ,status-buffer))
|
||||
(current-buffer)))
|
||||
|
||||
;; XXX this adds another top level menu, instead figure out how to
|
||||
;; replace the Log-View menu.
|
||||
|
@ -185,7 +185,8 @@ RESULT is a list of conses (FILE . STATE) for directory DIR."
|
||||
(generate-new-buffer-name " *vc svn status*"))
|
||||
(vc-svn-command (current-buffer) 'async nil "status")
|
||||
(vc-exec-after
|
||||
`(vc-svn-after-dir-status (quote ,callback) ,buffer))))
|
||||
`(vc-svn-after-dir-status (quote ,callback) ,buffer))
|
||||
(current-buffer)))
|
||||
|
||||
(defun vc-svn-working-revision (file)
|
||||
"SVN-specific version of `vc-working-revision'."
|
||||
|
32
lisp/vc.el
32
lisp/vc.el
@ -174,6 +174,8 @@
|
||||
;; this list, it should be run asynchronously. When RESULT is
|
||||
;; computed, it should be passed back by doing:
|
||||
;; (funcall UPDATE-FUNCTION RESULT STATUS-BUFFER)
|
||||
;; Return the buffer used for the asynchronous call. This buffer
|
||||
;; is used to kill the status update process on demand.
|
||||
;; This function is used by vc-status, a replacement for vc-dired.
|
||||
;; vc-status is still under development, and is NOT feature
|
||||
;; complete. As such, the requirements for this function might
|
||||
@ -2715,6 +2717,7 @@ With prefix arg READ-SWITCHES, specify a value to override
|
||||
(define-key map "o" 'vc-status-find-file-other-window)
|
||||
(define-key map "q" 'bury-buffer)
|
||||
(define-key map "g" 'vc-status-refresh)
|
||||
(define-key map "\C-c\C-c" 'vc-status-kill-dir-status-process)
|
||||
;; Not working yet. Functions like vc-status-find-file need to
|
||||
;; find the file from the mouse position, not `point'.
|
||||
;; (define-key map [(down-mouse-3)] 'vc-status-menu)
|
||||
@ -2785,6 +2788,9 @@ With prefix arg READ-SWITCHES, specify a value to override
|
||||
(interactive "e")
|
||||
(popup-menu vc-status-mode-menu e))
|
||||
|
||||
(defvar vc-status-process-buffer nil
|
||||
"The buffer used for the asynchronous call that computes the VC status.")
|
||||
|
||||
(defun vc-status-mode ()
|
||||
"Major mode for VC status.
|
||||
\\{vc-status-mode-map}"
|
||||
@ -2796,6 +2802,7 @@ With prefix arg READ-SWITCHES, specify a value to override
|
||||
(backend (vc-responsible-backend default-directory))
|
||||
entries)
|
||||
(erase-buffer)
|
||||
(set (make-local-variable 'vc-status-process-buffer) nil)
|
||||
(set (make-local-variable 'vc-status)
|
||||
(ewoc-create #'vc-status-printer
|
||||
(vc-status-headers backend default-directory)))
|
||||
@ -2805,10 +2812,11 @@ With prefix arg READ-SWITCHES, specify a value to override
|
||||
|
||||
(defun vc-update-vc-status-buffer (entries buffer)
|
||||
(with-current-buffer buffer
|
||||
(dolist (entry entries)
|
||||
(ewoc-enter-last vc-status
|
||||
(vc-status-create-fileinfo (cdr entry) (car entry))))
|
||||
(ewoc-goto-node vc-status (ewoc-nth vc-status 0))
|
||||
(when entries
|
||||
(dolist (entry entries)
|
||||
(ewoc-enter-last vc-status
|
||||
(vc-status-create-fileinfo (cdr entry) (car entry))))
|
||||
(ewoc-goto-node vc-status (ewoc-nth vc-status 0)))
|
||||
(setq mode-line-process nil)))
|
||||
|
||||
(defun vc-status-refresh ()
|
||||
@ -2822,9 +2830,19 @@ With prefix arg READ-SWITCHES, specify a value to override
|
||||
;; be asynchronous. It should compute the results and call the
|
||||
;; function passed as a an arg to update the vc-status buffer with
|
||||
;; the results.
|
||||
(vc-call-backend
|
||||
backend 'dir-status default-directory
|
||||
#'vc-update-vc-status-buffer (current-buffer))))
|
||||
(setq vc-status-process-buffer
|
||||
(vc-call-backend
|
||||
backend 'dir-status default-directory
|
||||
#'vc-update-vc-status-buffer (current-buffer)))))
|
||||
|
||||
(defun vc-status-kill-dir-status-process ()
|
||||
"Kill the temporary buffer and associated process."
|
||||
(interactive)
|
||||
(when (and (bufferp vc-status-process-buffer)
|
||||
(buffer-live-p vc-status-process-buffer))
|
||||
(let ((proc (get-buffer-process vc-status-process-buffer)))
|
||||
(when proc (delete-process proc))
|
||||
(setq mode-line-process nil))))
|
||||
|
||||
(defun vc-status-next-line (arg)
|
||||
"Go to the next line.
|
||||
|
Loading…
Reference in New Issue
Block a user