]> git.eshelyaron.com Git - emacs.git/commitdiff
* vc-cvs.el, vc-svn.el: Simplify backend dired-state-info
authorEric S. Raymond <esr@snark.thyrsus.com>
Fri, 28 Dec 2007 16:24:31 +0000 (16:24 +0000)
committerEric S. Raymond <esr@snark.thyrsus.com>
Fri, 28 Dec 2007 16:24:31 +0000 (16:24 +0000)
functions so they don't do work that the default one can do instead

lisp/ChangeLog
lisp/vc-cvs.el
lisp/vc-svn.el
lisp/vc.el

index bfdba9ab2b84a8bd877db3e21152970b7d047654..eefada19f60466948d202c43433acbb128f9de0a 100644 (file)
@@ -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  <nickrob@snap.net.nz>
 
        * thumbs.el (thumbs-call-convert): Use call-process directly
index f5c86d4ead87476ac7a660419e47f6354b85d7a3..3728d72547829cf837326c4142f36a4ab979293e 100644 (file)
@@ -285,9 +285,8 @@ committed and support display of sticky tags."
     (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
index 533a93c380f12b5d774867af24f62b3d469835ba..7ce1634d45cc5b486e570fb6ebe6103629cbfaa7 100644 (file)
@@ -179,8 +179,10 @@ If you want to force an empty list of arguments, use t."
     (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))))
index e8a481be3d35a7b56987729fbab41ed640b8f862..373d0f501240bf154d6c6f2ae6b288e412193601 100644 (file)
@@ -3075,6 +3075,7 @@ to provide the `find-revision' operation instead."
          ((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))