]> git.eshelyaron.com Git - emacs.git/commitdiff
2003-01-25 Michael Kifer <kifer@cs.stonybrook.edu>
authorMichael Kifer <kifer@cs.stonybrook.edu>
Sat, 25 Jan 2003 08:09:16 +0000 (08:09 +0000)
committerMichael Kifer <kifer@cs.stonybrook.edu>
Sat, 25 Jan 2003 08:09:16 +0000 (08:09 +0000)
        * ediff.el (ediff-revision): better defaults.

* ediff-vers.el (ediff-vc-latest-version): new function.
(ediff-vc-internal): use latest version instead of working version.

lisp/ChangeLog
lisp/ediff-vers.el
lisp/ediff.el
man/ediff.texi

index aa36759dcb4643a41f762d0916a46181f549d661..bfe0c092b4f0ed8ff746e0929842d6ecf5c2b8fd 100644 (file)
@@ -1,3 +1,10 @@
+2003-01-25  Michael Kifer  <kifer@cs.stonybrook.edu>
+       
+        * ediff.el (ediff-revision): better defaults.
+       
+       * ediff-vers.el (ediff-vc-latest-version): new function.
+       (ediff-vc-internal): use latest version instead of working version.
+       
 2003-01-24  Thien-Thi Nguyen  <ttn@gnu.org>
 
        * info.el (Info-extract-menu-node-name): When looking for end of menu
index 88d4ea16d7b26658c0865bbdd59cda650cb3ec14..03bc171a657d8ab1a751ec50bd0b2cabaab5a12c 100644 (file)
 ;; end pacifier
       
 ;; VC.el support
+
+(defun ediff-vc-latest-version (file)
+  "Return the version level of the latest version of FILE in repository."
+  (if (fboundp 'vc-latest-version)
+      (vc-latest-version file)
+    (or (vc-file-getprop file 'vc-latest-version)
+       (cond ((vc-backend file)
+              (vc-call state file)
+              (vc-file-getprop file 'vc-latest-version))
+             (t (error "File %s is not under version control" file))))
+    ))
+
+
 (defun ediff-vc-internal (rev1 rev2 &optional startup-hooks)
-;; Run Ediff on versions of the current buffer.
-;; If REV2 is "" then compare current buffer with REV1.
-;; If the current buffer is named `F', the version is named `F.~REV~'.
-;; If `F.~REV~' already exists, it is used instead of being re-created.
+  ;; Run Ediff on versions of the current buffer.
+  ;; If REV1 is "", use the latest version of the current buffer's file.
+  ;; If REV2 is "" then compare current buffer with REV1.
+  ;; If the current buffer is named `F', the version is named `F.~REV~'.
+  ;; If `F.~REV~' already exists, it is used instead of being re-created.
   (let (file1 file2 rev1buf rev2buf)
+    (if (string= rev1 "") 
+       (setq rev1 (ediff-vc-latest-version (buffer-file-name))))
     (save-window-excursion
       (save-excursion
        (vc-version-other-window rev1)
index 44eac2d7abd23a0cea3f4bb1912561588bca1aea..351809482aa7414c25565cf6a8fadc55e994e6c1 100644 (file)
@@ -1,13 +1,13 @@
 ;;; ediff.el --- a comprehensive visual interface to diff & patch
 
-;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02, 03 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 ;; Created: February 2, 1994
 ;; Keywords: comparing, merging, patching, tools, unix
 
-(defconst ediff-version "2.77" "The current version of Ediff")
-(defconst ediff-date "March 5, 2002" "Date of last update")  
+(defconst ediff-version "2.78" "The current version of Ediff")
+(defconst ediff-date "January 25, 2003" "Date of last update")  
 
 
 ;; This file is part of GNU Emacs.
@@ -1353,11 +1353,11 @@ Uses `vc.el' or `rcs.el' depending on `ediff-version-control-package'."
   (let (rev1 rev2)
     (setq rev1
          (read-string
-          (format "Version 1 to compare (default: %s's working version): "
+          (format "Revision 1 to compare (default: %s's latest revision): "
                   (file-name-nondirectory file)))
          rev2
          (read-string 
-          (format "Version 2 to compare (default: %s): "
+          (format "Revision 2 to compare (default: %s's current state): "
                   (file-name-nondirectory file))))
     (ediff-load-version-control)
     (funcall
index 3628091126b759180285a11e106169055148f693..fa3774ec08ccbd50e4a72fb25e1db4ebc470f2d2 100644 (file)
@@ -2434,6 +2434,7 @@ Tibor Polgar (tlp00@@spg.amdahl.com),
 David Prince (dave0d@@fegs.co.uk),
 Paul Raines (raines@@slac.stanford.edu),
 Stefan Reicher (xsteve@@riic.at),
+Charles Rich (rich@@merl.com),
 Bill Richter (richter@@math.nwu.edu),
 C.S.@: Roberson (roberson@@aur.alcatel.com),
 Kevin Rodgers (kevin.rodgers@@ihs.com),