[Top][All Lists]

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

New PCVS command: d y -> diff-yesterday

From: Kim F. Storm
Subject: New PCVS command: d y -> diff-yesterday
Date: 07 Jun 2004 16:46:50 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

It happens (quite often) that I would like to see what changes
the latest cvs-update installed.  

Of course, I could do cvs-examine first, but once I've done
cvs-update, it's too late.

Here's a small change which adds a "d y" to diff with yesterday's
version of the file.  This isn't exactly equivalent of "installed by
latest cvs-update", but for me, it is good enough in practice:


Index: lisp/pcvs.el
RCS file: /cvsroot/emacs/emacs/lisp/pcvs.el,v
retrieving revision 1.69
diff -u -r1.69 pcvs.el
--- lisp/pcvs.el        19 May 2004 18:55:51 -0000      1.69
+++ lisp/pcvs.el        7 Jun 2004 14:41:15 -0000
@@ -1565,6 +1565,12 @@
   (interactive (list (cvs-flags-query 'cvs-diff-flags "cvs diff flags")))
   (cvs-mode-diff-1 (cons "-rHEAD" flags)))
+(defun-cvs-mode (cvs-mode-diff-yesterday . SIMPLE) (flags)
+  "Diff the selected files against yesterday's head of the current branch.
+See ``cvs-mode-diff'' for more info."
+  (interactive (list (cvs-flags-query 'cvs-diff-flags "cvs diff flags")))
+  (cvs-mode-diff-1 (cons "-Dyesterday" flags)))
 (defun-cvs-mode (cvs-mode-diff-vendor . SIMPLE) (flags)
   "Diff the selected files against the head of the vendor branch.
 See ``cvs-mode-diff'' for more info."

Index: lisp/pcvs-defs.el
RCS file: /cvsroot/emacs/emacs/lisp/pcvs-defs.el,v
retrieving revision 1.25
diff -u -r1.25 pcvs-defs.el
--- lisp/pcvs-defs.el   11 Feb 2004 20:01:12 -0000      1.25
+++ lisp/pcvs-defs.el   7 Jun 2004 14:41:36 -0000
@@ -305,6 +305,7 @@
     ("d" "diff" .      cvs-mode-diff)
     ("b" "backup" .    cvs-mode-diff-backup)
     ("h" "head" .      cvs-mode-diff-head)
+    ("y" "yesterday" . cvs-mode-diff-yesterday)
     ("v" "vendor" .    cvs-mode-diff-vendor))
   "Keymap for diff-related operations in `cvs-mode'."
   :name "Diff")

Kim F. Storm <address@hidden> http://www.cua.dk

reply via email to

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