Function: cvs-fileinfo-pp

cvs-fileinfo-pp is a byte-compiled function defined in pcvs-info.el.gz.

Signature

(cvs-fileinfo-pp FILEINFO)

Documentation

Pretty print FILEINFO. Insert a printed representation in current buffer.

For use by the ewoc package.

Source Code

;; Defined in /usr/src/emacs/lisp/vc/pcvs-info.el.gz
(defun cvs-fileinfo-pp (fileinfo)
  "Pretty print FILEINFO.  Insert a printed representation in current buffer.
For use by the ewoc package."
  (cvs-check-fileinfo fileinfo)
  (let ((type (cvs-fileinfo->type fileinfo))
	(subtype (cvs-fileinfo->subtype fileinfo)))
    (insert
     (pcase type
       ('DIRCHANGE (concat "In directory "
                           (cvs-add-face (cvs-fileinfo->full-name fileinfo)
                                         'cvs-header t 'cvs-goal-column t)
                           ":"))
       ('MESSAGE
	(cvs-add-face (format "Message: %s" (cvs-fileinfo->full-log fileinfo))
		      'cvs-msg))
       (_
	(let* ((status (if (cvs-fileinfo->marked fileinfo)
			   (cvs-add-face "*" 'cvs-marked)
			 " "))
	       (file (cvs-add-face (cvs-fileinfo->pp-name fileinfo)
				   'cvs-filename t 'cvs-goal-column t))
	       (base (or (cvs-fileinfo->base-rev fileinfo) ""))
	       (head (cvs-fileinfo->head-rev fileinfo))
	       (type
		(let ((str (pcase type
			     ;;(MOD-CONFLICT "Not Removed")
			     ('DEAD	  "")
			     (_ (capitalize (symbol-name type)))))
		      (face (let ((sym (intern-soft
					(concat "cvs-fi-"
						(downcase (symbol-name type))
						"-face"))))
			      (or (and (boundp sym) (symbol-value sym))
				  'cvs-need-action))))
		  (cvs-add-face str face cvs-status-map)))
	       (side (or
		      ;; maybe a subtype
		      (when subtype (downcase (symbol-name subtype)))
		      ;; or the head-rev
		      (when (and head (not (string= head base))) head)
		      ;; or nothing
		      "")))
	   (format "%-11s %s %-11s %-11s %s"
		   side status type base file))))
     "\n")))