# HG changeset patch # User Eric S. Raymond # Date 1198859071 0 # Node ID 7477a697d7e1e5edbba12f4d8490a257d487193e # Parent a721577a4af2fd39866cd7db2050c4c81f2dd0a1 * vc-cvs.el, vc-svn.el: Simplify backend dired-state-info functions so they don't do work that the default one can do instead diff -r a721577a4af2 -r 7477a697d7e1 lisp/ChangeLog --- a/lisp/ChangeLog Fri Dec 28 15:00:21 2007 +0000 +++ b/lisp/ChangeLog Fri Dec 28 16:24:31 2007 +0000 @@ -16,6 +16,9 @@ keeping undo lists on the buffers holding status output, which can get extremely large. + * vc-cvs.el, vc-svn.el: Simplify backend dired-state-info + functions so they don't do work that the default one can do instead + 2007-12-28 Nick Roberts * thumbs.el (thumbs-call-convert): Use call-process directly diff -r a721577a4af2 -r 7477a697d7e1 lisp/vc-cvs.el --- a/lisp/vc-cvs.el Fri Dec 28 15:00:21 2007 +0000 +++ b/lisp/vc-cvs.el Fri Dec 28 16:24:31 2007 +0000 @@ -285,9 +285,8 @@ (cond ((eq cvs-state 'edited) (if (equal (vc-working-revision file) "0") "(added)" "(modified)")) - ((eq cvs-state 'needs-patch) "(patch)") - ((eq cvs-state 'needs-merge) "(merge)")))) - + (t + (vc-default-dired-state-info 'CVS file))))) ;;; ;;; State-changing functions diff -r a721577a4af2 -r 7477a697d7e1 lisp/vc-svn.el --- a/lisp/vc-svn.el Fri Dec 28 15:00:21 2007 +0000 +++ b/lisp/vc-svn.el Fri Dec 28 16:24:31 2007 +0000 @@ -179,8 +179,10 @@ (cond ((eq svn-state 'edited) (if (equal (vc-working-revision file) "0") "(added)" "(modified)")) - ((eq svn-state 'needs-patch) "(patch)") - ((eq svn-state 'needs-merge) "(merge)")))) + (t + ;; fall back to the default VC representation + (vc-default-dired-state-info 'SVN file))))) + (defun vc-svn-previous-revision (file rev) (let ((newrev (1- (string-to-number rev)))) diff -r a721577a4af2 -r 7477a697d7e1 lisp/vc.el --- a/lisp/vc.el Fri Dec 28 15:00:21 2007 +0000 +++ b/lisp/vc.el Fri Dec 28 16:24:31 2007 +0000 @@ -3075,6 +3075,7 @@ ((eq state 'edited) (concat "(" (vc-user-login-name file) ")")) ((eq state 'needs-merge) "(merge)") ((eq state 'needs-patch) "(patch)") + ((eq state 'added) "(added)") ((eq state 'unlocked-changes) "(stale)"))) (buffer (get-file-buffer file))