+2010-06-30 Dan Nicolaescu <dann@ics.uci.edu>
+
+ Avoid displaying files with a nil state in vc-dir.
+ * vc-dir.el (vc-dir-update): Obey the noinsert argument in all
+ cases that cause insertion.
+ (vc-dir-resynch-file): Tell vc-dir-update to avoid inserting files
+ with a nil state.
+
2010-06-30 Chong Yidong <cyd@stupidchicken.com>
* xml.el (xml-parse-region): Avoid infloop (Bug#5281).
(setq entry (car entries))
(setq node (ewoc-next vc-ewoc node)))
(t
- (ewoc-enter-before vc-ewoc node
- (apply 'vc-dir-create-fileinfo entry))
+ (unless noinsert
+ (ewoc-enter-before vc-ewoc node
+ (apply 'vc-dir-create-fileinfo entry)))
(setq entries (cdr entries))
(setq entry (car entries))))))
(t
- ;; We might need to insert a directory node if the
- ;; 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)))
- (unless (string-equal entrydir prev-dir)
- (ewoc-enter-before
- vc-ewoc node (vc-dir-create-fileinfo rd nil nil nil entrydir))))
- ;; Now insert the node itself.
- (ewoc-enter-before vc-ewoc node
- (apply 'vc-dir-create-fileinfo entry))
+ (unless noinsert
+ ;; We might need to insert a directory node if the
+ ;; 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)))
+ (unless (string-equal entrydir prev-dir)
+ (ewoc-enter-before
+ vc-ewoc node (vc-dir-create-fileinfo rd nil nil nil entrydir))))
+ ;; Now insert the node itself.
+ (ewoc-enter-before vc-ewoc node
+ (apply 'vc-dir-create-fileinfo entry)))
(setq entries (cdr entries) entry (car entries))))))
;; We're past the last node, all remaining entries go to the end.
(unless (or node noinsert)
(vc-dir-resync-directory-files file)
(ewoc-set-hf vc-ewoc
(vc-dir-headers vc-dir-backend default-directory) ""))
- (let ((state (vc-dir-recompute-file-state file ddir)))
+ (let* ((complete-state (vc-dir-recompute-file-state file ddir))
+ (state (cadr complete-state)))
(vc-dir-update
- (list state)
- status-buf (eq (cadr state) 'up-to-date))))))))))
+ (list complete-state)
+ status-buf (or (not state)
+ (eq state 'up-to-date)))))))))))
;; Remove out-of-date entries from vc-dir-buffers.
(dolist (b drop) (setq vc-dir-buffers (delq b vc-dir-buffers)))))