unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* New PCVS command: d y -> diff-yesterday
@ 2004-06-07 14:46 Kim F. Storm
  2004-06-08 13:31 ` Robert J. Chassell
  2004-06-27 18:23 ` d r -> diff-repository (was: New PCVS command: d y -> diff-yesterday) Juri Linkov
  0 siblings, 2 replies; 6+ messages in thread
From: Kim F. Storm @ 2004-06-07 14:46 UTC (permalink / raw)



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:

WDYT?

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 <storm@cua.dk> http://www.cua.dk

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: New PCVS command: d y -> diff-yesterday
  2004-06-07 14:46 New PCVS command: d y -> diff-yesterday Kim F. Storm
@ 2004-06-08 13:31 ` Robert J. Chassell
  2004-06-27 18:23 ` d r -> diff-repository (was: New PCVS command: d y -> diff-yesterday) Juri Linkov
  1 sibling, 0 replies; 6+ messages in thread
From: Robert J. Chassell @ 2004-06-08 13:31 UTC (permalink / raw)


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

   ....

   Here's a small change which adds a "d y" to diff with yesterday's
   version of the file.

Works in a quick test.  I like this feature.  We should include it.

-- 
    Robert J. Chassell                         Rattlesnake Enterprises
    As I slowly update it,                     bob@rattlesnake.com
        I rewrite a "What's New" segment for   http://www.rattlesnake.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* d r -> diff-repository (was: New PCVS command: d y -> diff-yesterday)
  2004-06-07 14:46 New PCVS command: d y -> diff-yesterday Kim F. Storm
  2004-06-08 13:31 ` Robert J. Chassell
@ 2004-06-27 18:23 ` Juri Linkov
  2004-07-12  9:36   ` Kim F. Storm
  1 sibling, 1 reply; 6+ messages in thread
From: Juri Linkov @ 2004-06-27 18:23 UTC (permalink / raw)


storm@cua.dk (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/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: d r -> diff-repository (was: New PCVS command: d y -> diff-yesterday)
  2004-06-27 18:23 ` d r -> diff-repository (was: New PCVS command: d y -> diff-yesterday) Juri Linkov
@ 2004-07-12  9:36   ` Kim F. Storm
  2004-07-12 12:27     ` d r -> diff-repository Juri Linkov
  0 siblings, 1 reply; 6+ messages in thread
From: Kim F. Storm @ 2004-07-12  9:36 UTC (permalink / raw)
  Cc: emacs-devel

Juri Linkov <juri@jurta.org> writes:

> 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.

How is this different from d h (cvs-mode-diff-head) ?


> 
> 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/
> 
> 
> 
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel
> 
> 

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: d r -> diff-repository
  2004-07-12  9:36   ` Kim F. Storm
@ 2004-07-12 12:27     ` Juri Linkov
  2004-07-12 13:02       ` Kim F. Storm
  0 siblings, 1 reply; 6+ messages in thread
From: Juri Linkov @ 2004-07-12 12:27 UTC (permalink / raw)
  Cc: emacs-devel

storm@cua.dk (Kim F. Storm) writes:
> Juri Linkov <juri@jurta.org> writes:
>> 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.
>
> How is this different from d h (cvs-mode-diff-head) ?

`d h' displays the difference between your working file and the latest
revision committed to the repository.  That means that it intermixes
in one diff your changes and changes anyone has committed to the
repository since you last executed checkout/update/commit.  As such
`d h' is pretty useless since you can't tell where are your changes
and where are changes anyone committed to the repository.  Such diff
actually displays the changes which, if committed, will overwrite
the changes someone committed to the repository.  But since in most
cases you don't want to overwrite committed changes, looking at such
diff is useless anyhow.

Instead of one composite diff, two distinct diff types are more useful:
one is `d =' which displays only your changes, and a new `d r' which
displays the changes committed to the repository since your last
checkout/update/commit.

Actually, `d r' displays the same changes you might receive from the
automatic emacs-diffs mailing list.  But instead of subscribing to
emacs-diffs and browsing the mail archives, if you want to track all
changes in the CVS repository, you can move the point to the PCL-CVS
line with the CVS root directory "In directory .:" and type `d r'.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: d r -> diff-repository
  2004-07-12 12:27     ` d r -> diff-repository Juri Linkov
@ 2004-07-12 13:02       ` Kim F. Storm
  0 siblings, 0 replies; 6+ messages in thread
From: Kim F. Storm @ 2004-07-12 13:02 UTC (permalink / raw)
  Cc: emacs-devel

Juri Linkov <juri@jurta.org> writes:

> storm@cua.dk (Kim F. Storm) writes:
> > Juri Linkov <juri@jurta.org> writes:
> >> 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.
> >
> > How is this different from d h (cvs-mode-diff-head) ?
> 
> Instead of one composite diff, two distinct diff types are more useful:
> one is `d =' which displays only your changes, and a new `d r' which
> displays the changes committed to the repository since your last
> checkout/update/commit.

I see.  Very useful indeed.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-07-12 13:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-07 14:46 New PCVS command: d y -> diff-yesterday Kim F. Storm
2004-06-08 13:31 ` Robert J. Chassell
2004-06-27 18:23 ` d r -> diff-repository (was: New PCVS command: d y -> diff-yesterday) Juri Linkov
2004-07-12  9:36   ` Kim F. Storm
2004-07-12 12:27     ` d r -> diff-repository Juri Linkov
2004-07-12 13:02       ` Kim F. Storm

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).