X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/369c41754f0090065eb226e879f5c30a2a711132..5f46725992bf26f887483c14c63c03f5b5794f34:/lisp/vc/vc-dir.el diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index e616c9a895..4955c5abf9 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -1,6 +1,6 @@ ;;; vc-dir.el --- Directory status display under VC -*- lexical-binding: t -*- -;; Copyright (C) 2007-2013 Free Software Foundation, Inc. +;; Copyright (C) 2007-2014 Free Software Foundation, Inc. ;; Author: Dan Nicolaescu ;; Keywords: vc tools @@ -245,6 +245,7 @@ See `run-hooks'." (define-key map "+" 'vc-update) ;; C-x v + (define-key map "l" 'vc-print-log) ;; C-x v l (define-key map "L" 'vc-print-root-log) ;; C-x v L + (define-key map "I" 'vc-log-incoming) ;; C-x v I ;; More confusing than helpful, probably ;;(define-key map "R" 'vc-revert) ;; u is taken by vc-dir-unmark. ;;(define-key map "A" 'vc-annotate) ;; g is taken by revert-buffer @@ -432,7 +433,8 @@ If NOINSERT, ignore elements on ENTRIES which are not in the ewoc." ;; previous node was in a different directory. (let* ((rd (file-relative-name entrydir)) (prev-node (ewoc-prev vc-ewoc node)) - (prev-dir (vc-dir-node-directory prev-node))) + (prev-dir (if prev-node + (vc-dir-node-directory prev-node)))) (unless (string-equal entrydir prev-dir) (ewoc-enter-before vc-ewoc node (vc-dir-create-fileinfo rd nil nil nil entrydir)))) @@ -1014,7 +1016,7 @@ specific headers." (vc-call-backend backend 'dir-extra-headers dir) "\n")) -(defun vc-dir-refresh-files (files default-state) +(defun vc-dir-refresh-files (files) "Refresh some files in the *VC-dir* buffer." (let ((def-dir default-directory) (backend vc-dir-backend)) @@ -1032,7 +1034,7 @@ specific headers." (setq default-directory def-dir) (erase-buffer) (vc-call-backend - backend 'dir-status-files def-dir files default-state + backend 'dir-status-files def-dir files (lambda (entries &optional more-to-come) ;; ENTRIES is a list of (FILE VC_STATE EXTRA) items. ;; If MORE-TO-COME is true, then more updates will come from @@ -1097,7 +1099,7 @@ Throw an error if another update process is in progress." (setq default-directory def-dir) (erase-buffer) (vc-call-backend - backend 'dir-status def-dir + backend 'dir-status-files def-dir nil (lambda (entries &optional more-to-come) ;; ENTRIES is a list of (FILE VC_STATE EXTRA) items. ;; If MORE-TO-COME is true, then more updates will come from @@ -1110,8 +1112,7 @@ Throw an error if another update process is in progress." vc-ewoc 'vc-dir-fileinfo->needs-update))) (if remaining (vc-dir-refresh-files - (mapcar 'vc-dir-fileinfo->name remaining) - 'up-to-date) + (mapcar 'vc-dir-fileinfo->name remaining)) (setq mode-line-process nil)))))))))))) (defun vc-dir-show-fileentry (file) @@ -1125,18 +1126,18 @@ outside of VC) and one wants to do some operation on it." "Hide items that are in STATE from display. See `vc-state' for valid values of STATE. -If STATE is nil, default it to up-to-date. +If STATE is nil, hide both `up-to-date' and `ignored' items. Interactively, if `current-prefix-arg' is non-nil, set STATE to -state of item at point. Otherwise, set STATE to up-to-date." +state of item at point, if any." (interactive (list (and current-prefix-arg ;; Command is prefixed. Infer STATE from point. (let ((node (ewoc-locate vc-ewoc))) (and node (vc-dir-fileinfo->state (ewoc-data node))))))) - ;; If STATE is un-specified, use up-to-date. - (setq state (or state 'up-to-date)) - (message "Hiding items in state \"%s\"" state) + (if state + (message "Hiding items in state \"%s\"" state) + (message "Hiding up-to-date and ignored items")) (let ((crt (ewoc-nth vc-ewoc -1)) (first (ewoc-nth vc-ewoc 0))) ;; Go over from the last item to the first and remove the @@ -1157,8 +1158,10 @@ state of item at point. Otherwise, set STATE to up-to-date." ;; Next item is a directory. (vc-dir-fileinfo->directory (ewoc-data next)))) ;; Remove files in specified STATE. STATE can be a - ;; symbol or a user-name. - (equal (vc-dir-fileinfo->state data) state)) + ;; symbol, a user-name, or nil. + (if state + (equal (vc-dir-fileinfo->state data) state) + (memq (vc-dir-fileinfo->state data) '(up-to-date ignored)))) (ewoc-delete vc-ewoc crt)) (setq crt prev)))))