[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Enhancement idea for cvs-mode-log

From: Jesse Byler
Subject: Enhancement idea for cvs-mode-log
Date: Thu, 23 Feb 2006 14:39:44 -0500

Use case: I've done a cvs-examine and I'm browsing a list of changed files in *cvs*. I want to see log messages and diffs for some of the changed files. If I open the file (f) and view the log with vc-print- log (C-x v l), the cursor jumps to the working copy revision, which lets me see what revisions are newer than my working file and view diffs. I would like to be able to do this directly from a cvs-mode buffer without visiting the file first (i.e. make pcl-cvs's cvs-mode- log work like vc's vc-print-log).

I was unsuccessful implementing exactly that (for some reason, changing the cursor position in the cvs-mode-do :postproc doesn't stick and the cursor ends up back at the beginning of the buffer) but instead have something similar and perhaps more useful: a modified cvs-mode-log function which displays the log messages for current and past revisions grayed out, so that "future" revisions stand out in white. It could probably be cleaned up (it uses vc- commands, face isn't customizable) and it doesn't work as expected when more than one file is marked in *cvs* (since it just grays out to the end of the buffer instead of searching for the end of the current file's logs). But it works well enough for my personal use and I thought it could serve as a proof-of-concept.


(defun-cvs-mode (fancy-cvs-mode-log . NOARGS) (flags)
  "Display the cvs log of all selected files.
  With prefix argument, prompt for cvs flags."
  (interactive (list (cvs-add-branch-prefix
                      (cvs-flags-query 'cvs-log-flags "cvs log flags"))))
  (cvs-mode-do "log" flags nil
               :show t
               `((let ((focus-rev
                          (concat "./" (cvs-fileinfo->full-name
                                        (car (cvs-mode-marked nil))))))
                       (inhibit-read-only t))
                   (if (stringp focus-rev)
(vc-call-backend 'CVS 'show-log-entry focus- rev)
                         (put-text-property (point) (point-max)
'font-lock-face 'shadow nil)))))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]