Function: vc-cvs-after-dir-status

vc-cvs-after-dir-status is a byte-compiled function defined in vc-cvs.el.gz.

Signature

(vc-cvs-after-dir-status UPDATE-FUNCTION)

Source Code

;; Defined in /usr/src/emacs/lisp/vc/vc-cvs.el.gz
(defun vc-cvs-after-dir-status (update-function)
  (let ((result nil)
        (translation '((?? . unregistered)
                       (?A . added)
                       (?C . conflict)
                       (?M . edited)
                       (?P . needs-merge)
                       (?R . removed)
                       (?U . needs-update))))
    (goto-char (point-min))
    (while (not (eobp))
      (if (looking-at "^[ACMPRU?] \\(.*\\)$")
          (push (list (match-string 1)
                      (cdr (assoc (char-after) translation)))
                result)
        (cond
         ((looking-at "cvs update: warning: \\(.*\\) was lost")
          ;; Format is:
          ;; cvs update: warning: FILENAME was lost
          ;; U FILENAME
          (push (list (match-string 1) 'missing) result)
          ;; Skip the "U" line
          (forward-line 1))
         ((looking-at "cvs update: New directory `\\(.*\\)' -- ignored")
          (push (list (match-string 1) 'unregistered) result))))
      (forward-line 1))
    (funcall update-function result)))