[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/vc.el,v
From: |
Alexandre Julliard |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/vc.el,v |
Date: |
Mon, 14 Apr 2008 15:19:06 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Alexandre Julliard <julliard> 08/04/14 15:19:05
Index: vc.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc.el,v
retrieving revision 1.579
retrieving revision 1.580
diff -u -b -r1.579 -r1.580
--- vc.el 14 Apr 2008 08:59:40 -0000 1.579
+++ vc.el 14 Apr 2008 15:19:04 -0000 1.580
@@ -3011,8 +3011,9 @@
(put 'vc-status-mode 'mode-class 'special)
-(defun vc-status-update (entries buffer)
- "Update BUFFER's ewoc from the list of ENTRIES."
+(defun vc-status-update (entries buffer &optional noinsert)
+ "Update BUFFER's ewoc from the list of ENTRIES.
+If NOINSERT, ignore elements on ENTRIES which are not in the ewoc."
;; Add ENTRIES to the vc-status buffer BUFFER.
(with-current-buffer buffer
;; Insert the entries sorted by name into the ewoc.
@@ -3021,28 +3022,30 @@
(setq entries (sort entries
(lambda (entry1 entry2)
(string-lessp (car entry1) (car entry2)))))
- (let ((entry (pop entries))
+ (let ((entry (car entries))
(node (ewoc-nth vc-status 0)))
- (while entry
- (let ((file (car entry)))
- ;; Note: we always keep node pointing to the last inserted entry
- ;; in order to catch duplicates in the entries list
- (cond ((not node)
- (setq node (ewoc-enter-last vc-status
- (apply 'vc-status-create-fileinfo
entry)))
- (setq entry (pop entries)))
- ((string-lessp (vc-status-fileinfo->name (ewoc-data node))
file)
+ (while (and entry node)
+ (let ((entryfile (car entry))
+ (nodefile (vc-status-fileinfo->name (ewoc-data node))))
+ (cond
+ ((string-lessp nodefile entryfile)
(setq node (ewoc-next vc-status node)))
- ((string-equal (vc-status-fileinfo->name (ewoc-data node))
file)
+ ((string-lessp nodefile entryfile)
+ (unless noinsert
+ (ewoc-enter-before vc-status node
+ (apply 'vc-status-create-fileinfo entry)))
+ (setq entries (cdr entries) entry (car entries)))
+ (t
(setf (vc-status-fileinfo->state (ewoc-data node)) (nth 1
entry))
(setf (vc-status-fileinfo->extra (ewoc-data node)) (nth 2
entry))
- (setf (vc-status-fileinfo->needs-update (ewoc-data node)) nil)
(ewoc-invalidate vc-status node)
- (setq entry (pop entries)))
- (t
- (setq node (ewoc-enter-before vc-status node
- (apply
'vc-status-create-fileinfo entry)))
- (setq entry (pop entries)))))))))
+ (setq entries (cdr entries) entry (car entries))
+ (setq node (ewoc-next vc-status node))))))
+ (unless (or node noinsert)
+ ;; We're past the last node, all remaining entries go to the end.
+ (while entries
+ (ewoc-enter-last vc-status
+ (apply 'vc-status-create-fileinfo (pop
entries))))))))
(defun vc-status-busy ()
(and (buffer-live-p vc-status-process-buffer)
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/04/04
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/04/04
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/04/06
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Jan Djärv, 2008/04/09
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Alexandre Julliard, 2008/04/09
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/04/10
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Stefan Monnier, 2008/04/11
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Alexandre Julliard, 2008/04/13
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/04/14
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v,
Alexandre Julliard <=
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Stefan Monnier, 2008/04/14
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Stefan Monnier, 2008/04/14
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/04/15
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Stefan Monnier, 2008/04/15
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/04/16
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Sam Steingold, 2008/04/18
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/04/21
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/04/21
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Stefan Monnier, 2008/04/21
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/04/22