[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: |
Dan Nicolaescu |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/vc.el,v |
Date: |
Tue, 15 Apr 2008 07:28:33 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Dan Nicolaescu <dann> 08/04/15 07:28:32
Index: vc.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc.el,v
retrieving revision 1.582
retrieving revision 1.583
diff -u -b -r1.582 -r1.583
--- vc.el 14 Apr 2008 16:36:32 -0000 1.582
+++ vc.el 15 Apr 2008 07:28:30 -0000 1.583
@@ -2714,7 +2714,9 @@
extra
marked
;; To keep track of not updated files during a global refresh
- needs-update)
+ needs-update
+ ;; To distinguish files and directories.
+ directoryp)
(defvar vc-status nil)
@@ -2738,6 +2740,8 @@
(defun vc-default-status-printer (backend fileentry)
"Pretty print FILEENTRY."
+ (if (vc-status-fileinfo->directoryp fileentry)
+ (insert " Directory: %s" (vc-status-fileinfo->name fileentry))
;; If you change the layout here, change vc-status-move-to-goal-column.
(let ((state (vc-status-fileinfo->state fileentry)))
(insert
@@ -2755,7 +2759,7 @@
(propertize
(format "%s" (vc-status-fileinfo->name fileentry))
'face 'font-lock-function-name-face
- 'mouse-face 'highlight))))
+ 'mouse-face 'highlight)))))
(defun vc-status-printer (fileentry)
(let ((backend (vc-responsible-backend default-directory)))
@@ -3019,9 +3023,18 @@
;; Insert the entries sorted by name into the ewoc.
;; We assume the ewoc is sorted too, which should be the
;; case if we always add entries with vc-status-update.
- (setq entries (sort entries
+ (setq entries
+ ;; Sort: first files and then subdirectories.
+ ;; XXX: this is VERY inefficient, it computes the directory
+ ;; names too many times
+ (sort entries
(lambda (entry1 entry2)
- (string-lessp (car entry1) (car entry2)))))
+ (let ((dir1 (file-name-directory (expand-file-name (car
entry1))))
+ (dir2 (file-name-directory (expand-file-name (car
entry2)))))
+ (cond
+ ((string< dir1 dir2) t)
+ ((not (string= dir1 dir2)) nil)
+ ((string< (car entry1) (car entry2))))))))
(let ((entry (car entries))
(node (ewoc-nth vc-status 0)))
(while (and entry node)
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, (continued)
- [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, 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, Stefan Monnier, 2008/04/14
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v,
Dan Nicolaescu <=
- [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
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/04/23
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/04/27
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Sam Steingold, 2008/04/29