Mercurial > emacs
changeset 32187:418444640a1e
(cvs-ediff-exit-hook): Expect delete-window to fail.
(cvs-retrieve-revision): Reuse a pre-existing buffer.
(cvs-dired-action): Change the default to quickdir.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 05 Oct 2000 22:45:59 +0000 |
parents | 964f10494360 |
children | a771b5a6fa69 |
files | lisp/pcvs.el |
diffstat | 1 files changed, 20 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/pcvs.el Thu Oct 05 22:43:22 2000 +0000 +++ b/lisp/pcvs.el Thu Oct 05 22:45:59 2000 +0000 @@ -14,7 +14,7 @@ ;; Maintainer: (Stefan Monnier) monnier+lists/cvs/pcl@flint.cs.yale.edu ;; Keywords: CVS, version control, release management ;; Version: $Name: $ -;; Revision: $Id: pcvs.el,v 1.9 2000/08/16 20:27:37 monnier Exp $ +;; Revision: $Id: pcvs.el,v 1.10 2000/09/29 03:14:36 monnier Exp $ ;; This file is part of GNU Emacs. @@ -56,6 +56,8 @@ ;; ******** FIX THE DOCUMENTATION ********* ;; +;; - use UP-TO-DATE rather than DEAD when cleaning before `examine'. +;; ;; - hide fileinfos without getting rid of them (will require ewok work). ;; - add toolbar entries ;; - marking @@ -1445,7 +1447,7 @@ (when (and tb (buffer-live-p tb) (not (buffer-modified-p tb))) (let ((win (get-buffer-window tb t))) (kill-buffer tb) - (when (window-live-p win) (delete-window win))))) + (when (window-live-p win) (ignore-errors (delete-window win)))))) ;; switch back to the *cvs* buffer (when (and cvs-buf (buffer-live-p cvs-buf) (not (get-buffer-window cvs-buf t))) @@ -1470,21 +1472,21 @@ (defun cvs-retrieve-revision (fileinfo rev) "Retrieve the given REVision of the file in FILEINFO into a new buffer." - (save-excursion - (let* ((file (cvs-fileinfo->full-path fileinfo)) - (buf (create-file-buffer (concat file "." rev)))) - (set-buffer buf) - (message "Retrieving revision %s..." rev) - (let ((res (call-process cvs-program nil t nil - "-q" "update" "-p" "-r" rev file))) - (when (and res (not (and (equal 0 res)))) - (error "Something went wrong retrieving revision %s: %s" rev res)) - (set-buffer-modified-p nil) - (let ((buffer-file-name (expand-file-name file))) - (after-find-file)) - (toggle-read-only 1) - (message "Retrieving revision %s... Done" rev) - buf)))) + (let* ((file (cvs-fileinfo->full-path fileinfo)) + (buffile (concat file "." rev))) + (or (find-buffer-visiting buffile) + (with-current-buffer (create-file-buffer buffile) + (message "Retrieving revision %s..." rev) + (let ((res (call-process cvs-program nil t nil + "-q" "update" "-p" "-r" rev file))) + (when (and res (not (and (equal 0 res)))) + (error "Something went wrong retrieving revision %s: %s" rev res)) + (set-buffer-modified-p nil) + (let ((buffer-file-name (expand-file-name file))) + (after-find-file)) + (toggle-read-only 1) + (message "Retrieving revision %s... Done" rev) + (current-buffer)))))) (eval-and-compile (autoload 'smerge-ediff "smerge-mode")) @@ -2013,7 +2015,7 @@ ;; ;;;###autoload -(defcustom cvs-dired-action 'cvs-examine +(defcustom cvs-dired-action 'cvs-quickdir "The action to be performed when opening a CVS directory. Sensible values are `cvs-examine', `cvs-status' and `cvs-quickdir'." :group 'pcl-cvs