[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/ediff-vers.el
From: |
Michael Kifer |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/ediff-vers.el |
Date: |
Sat, 25 Jan 2003 03:09:17 -0500 |
Index: emacs/lisp/ediff-vers.el
diff -c emacs/lisp/ediff-vers.el:1.16 emacs/lisp/ediff-vers.el:1.17
*** emacs/lisp/ediff-vers.el:1.16 Mon Jan 7 23:36:01 2002
--- emacs/lisp/ediff-vers.el Sat Jan 25 03:09:15 2003
***************
*** 52,63 ****
;; end pacifier
;; VC.el support
(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.
(let (file1 file2 rev1buf rev2buf)
(save-window-excursion
(save-excursion
(vc-version-other-window rev1)
--- 52,79 ----
;; 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 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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/ediff-vers.el,
Michael Kifer <=