Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
dbe82b27
Commit
dbe82b27
authored
Jun 01, 2010
by
Dan Nicolaescu
Browse files
* lisp/vc-dir.el (vc-dir-update): Remove entries with a nil state (bug#5539).
Backport from trunk.
parent
feceda26
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
lisp/ChangeLog
lisp/ChangeLog
+4
-0
lisp/vc-dir.el
lisp/vc-dir.el
+15
-5
No files found.
lisp/ChangeLog
View file @
dbe82b27
2010-06-02 Dan Nicolaescu <dann@ics.uci.edu>
* vc-dir.el (vc-dir-update): Remove entries with a nil state (bug#5539).
2010-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
* vc-bzr.el (vc-bzr-revision-completion-table): Apply
...
...
lisp/vc-dir.el
View file @
dbe82b27
...
...
@@ -357,6 +357,7 @@ If NOINSERT, ignore elements on ENTRIES which are not in the ewoc."
;; Insert directory entries in the right places.
(let ((entry (car entries))
(node (ewoc-nth vc-ewoc 0))
(to-remove nil)
(dotname (file-relative-name default-directory)))
;; Insert . if it is not present.
(unless node
...
...
@@ -383,10 +384,16 @@ If NOINSERT, ignore elements on ENTRIES which are not in the ewoc."
((string-lessp nodefile entryfile)
(setq node (ewoc-next vc-ewoc node)))
((string-equal nodefile entryfile)
(setf (vc-dir-fileinfo->state (ewoc-data node)) (nth 1 entry))
(setf (vc-dir-fileinfo->extra (ewoc-data node)) (nth 2 entry))
(setf (vc-dir-fileinfo->needs-update (ewoc-data node)) nil)
(ewoc-invalidate vc-ewoc node)
(if (nth 1 entry)
(progn
(setf (vc-dir-fileinfo->state (ewoc-data node)) (nth 1 entry))
(setf (vc-dir-fileinfo->extra (ewoc-data node)) (nth 2 entry))
(setf (vc-dir-fileinfo->needs-update (ewoc-data node)) nil)
(ewoc-invalidate vc-ewoc node))
;; If the state is nil, the file does not exist
;; anymore, so remember the entry so we can remove
;; it after we are done inserting all ENTRIES.
(push node to-remove))
(setq entries (cdr entries))
(setq entry (car entries))
(setq node (ewoc-next vc-ewoc node)))
...
...
@@ -422,7 +429,10 @@ If NOINSERT, ignore elements on ENTRIES which are not in the ewoc."
vc-ewoc (vc-dir-create-fileinfo rd nil nil nil entrydir))))
;; Now insert the node itself.
(ewoc-enter-last vc-ewoc
(apply 'vc-dir-create-fileinfo entry)))))))))
(apply 'vc-dir-create-fileinfo entry))))))
(when to-remove
(let ((inhibit-read-only t))
(apply 'ewoc-delete vc-ewoc (nreverse to-remove)))))))
(defun vc-dir-busy ()
(and (buffer-live-p vc-dir-process-buffer)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment