emacs-devel
[Top][All Lists]
Advanced

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

d r -> diff-repository (was: New PCVS command: d y -> diff-yesterday)


From: Juri Linkov
Subject: d r -> diff-repository (was: New PCVS command: d y -> diff-yesterday)
Date: Sun, 27 Jun 2004 21:23:34 +0300
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

address@hidden (Kim F. Storm) writes:
> 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:

There is another useful command missing in PCVS: to view the changes
anyone has committed to the repository since you last executed
checkout/update/commit.  This command is useful to look at the changes
in the repository before doing cvs-update.

Index: lisp/pcvs.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/pcvs.el,v
retrieving revision 1.70
diff -u -r1.70 pcvs.el
--- lisp/pcvs.el        10 Jun 2004 08:29:32 -0000      1.70
+++ lisp/pcvs.el        27 Jun 2004 18:26:29 -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-repository . SIMPLE) (flags)
+  "Diff the files for changes in the repository since last co/update/commit.
+See ``cvs-mode-diff'' for more info."
+  (interactive (list (cvs-flags-query 'cvs-diff-flags "cvs diff flags")))
+  (cvs-mode-diff-1 (cons "-rBASE" (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."

Index: lisp/pcvs-defs.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/pcvs-defs.el,v
retrieving revision 1.26
diff -u -r1.26 pcvs-defs.el
--- lisp/pcvs-defs.el   10 Jun 2004 08:29:12 -0000      1.26
+++ lisp/pcvs-defs.el   27 Jun 2004 18:27:32 -0000
@@ -305,6 +305,7 @@
     ("d" "diff" .      cvs-mode-diff)
     ("b" "backup" .    cvs-mode-diff-backup)
     ("h" "head" .      cvs-mode-diff-head)
+    ("r" "repository" .        cvs-mode-diff-repository)
     ("y" "yesterday" . cvs-mode-diff-yesterday)
     ("v" "vendor" .    cvs-mode-diff-vendor))
   "Keymap for diff-related operations in `cvs-mode'."

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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