]> code.delx.au - gnu-emacs/blobdiff - lisp/pcvs.el
(Fformat): Add comment about the treatment of 0 as a multibyte
[gnu-emacs] / lisp / pcvs.el
index 3483adb1dde8711536aa2f127d671039f30066df..32631c09da92c87c9423104f213977882ab24b04 100644 (file)
@@ -14,7 +14,7 @@
 ;;     (Jari Aalto+mail.emacs) jari.aalto@poboxes.com
 ;; Maintainer: (Stefan Monnier) monnier+lists/cvs/pcl@flint.cs.yale.edu
 ;; Keywords: CVS, version control, release management
-;; Revision: $Id: pcvs.el,v 1.39 2002/09/03 01:40:29 monnier Exp $
+;; Revision: $Id: pcvs.el,v 1.45 2002/11/18 20:53:24 rost Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -338,7 +338,8 @@ the primay since reading the primary can deactivate it."
   "This mode is used for buffers related to a main *cvs* buffer.
 All the `cvs-mode' buffer operations are simply rebound under
 the \\[cvs-mode-map] prefix."
-  nil " CVS")
+  nil " CVS"
+  :group 'pcl-cvs)
 (put 'cvs-minor-mode 'permanent-local t)
 
 
@@ -646,7 +647,7 @@ it is finished."
            (buffer-enable-undo)
            (with-current-buffer cvs-buffer
              (cvs-update-header nil nil) ;FIXME: might need to be inline
-             (message "CVS process has completed"))))
+             (message "CVS process has completed in %s" (buffer-name)))))
        ;; This might not even be necessary
        (set-buffer obuf)))))
 
@@ -893,7 +894,7 @@ and run `cvs-mode' on it.
 With a prefix argument, prompt for cvs FLAGS to use."
   (interactive
    (list (cvs-string->strings (read-string "Module(s): " (cvs-get-module)))
-        (read-file-name "CVS Checkout Directory: "
+        (read-directory-name "CVS Checkout Directory: "
                         nil default-directory nil)
         (cvs-add-branch-prefix
          (cvs-flags-query 'cvs-checkout-flags "cvs checkout flags"))))
@@ -920,7 +921,7 @@ With a prefix argument, prompt for cvs FLAGS to use."
           (not current-prefix-arg)
           (not (eq last-command-char ?\r)))
       default-directory
-    (read-file-name msg nil default-directory nil)))
+    (read-directory-name msg nil default-directory nil)))
 
 ;;;###autoload
 (defun cvs-quickdir (dir &optional flags noshow)
@@ -976,9 +977,11 @@ Optional argument NOSHOW if non-nil means not to display the buffer."
 (defun cvs-update (directory flags)
   "Run a `cvs update' in the current working DIRECTORY.
 Feed the output to a *cvs* buffer and run `cvs-mode' on it.
-With a prefix argument, prompt for a directory and cvs FLAGS to use.
+With a \\[universal-argument] prefix argument, prompt for a directory to use.
 A prefix arg >8 (ex: \\[universal-argument] \\[universal-argument]),
-  prevents reuse of an existing *cvs* buffer."
+  prevents reuse of an existing *cvs* buffer.
+The prefix is also passed to `cvs-flags-query' to select the FLAGS
+  passed to cvs."
   (interactive (list (cvs-query-directory "CVS Update (directory): ")
                     (cvs-flags-query 'cvs-update-flags "cvs update flags")))
   (when (eq flags t)
@@ -1365,7 +1368,8 @@ If FILE is non-nil, directory entries won't be selected."
 (defcustom cvs-mode-commit-hook nil
   "Hook run after setting up the commit buffer."
   :type 'hook
-  :options '(cvs-mode-diff))
+  :options '(cvs-mode-diff)
+  :group 'pcl-cvs)
 
 (defun cvs-mode-commit (setup)
   "Check in all marked files, or the current file.
@@ -1743,6 +1747,12 @@ POSTPROC is a list of expressions to be evaluated at the very end (after
     ;; Save the relevant buffers
     (save-some-buffers nil (lambda () (cvs-is-within-p fis def-dir))))
   (unless (listp flags) (error "flags should be a list of strings"))
+  ;; Some w32 versions of CVS don't like an explicit . too much.
+  (when (and (car fis) (null (cdr fis))
+            (eq (cvs-fileinfo->type (car fis)) 'DIRCHANGE)
+            ;; (equal (cvs-fileinfo->file (car fis)) ".")
+            (equal (cvs-fileinfo->dir (car fis)) ""))
+    (setq fis nil))
   (let* ((cvs-buf (current-buffer))
         (single-dir (or (not (listp cvs-execute-single-dir))
                         (member cmd cvs-execute-single-dir)))
@@ -1888,7 +1898,7 @@ This command ignores files that are not flagged as `Unknown'."
 With a prefix, opens the buffer in an OTHER window."
   (interactive (list last-input-event current-prefix-arg))
   (when (ignore-errors (mouse-set-point e) t)  ;for invocation via the mouse
-    (unless (memq (get-text-property (1- (line-end-position)) 'face)
+    (unless (memq (get-text-property (1- (line-end-position)) 'font-lock-face)
                  '(cvs-header-face cvs-filename-face))
       (error "Not a file name")))
   (cvs-mode!
@@ -2002,9 +2012,10 @@ Returns a list of FIS that should be `cvs remove'd."
         (tmpbuf (cvs-temp-buffer)))
     (when (and (not silent) (equal cvs-confirm-removals 'list))
       (with-current-buffer tmpbuf
-       (cvs-insert-strings (mapcar 'cvs-fileinfo->full-path fis))
-       (cvs-pop-to-buffer-same-frame (current-buffer))
-       (shrink-window-if-larger-than-buffer)))
+       (let ((inhibit-read-only t))
+         (cvs-insert-strings (mapcar 'cvs-fileinfo->full-path fis))
+         (cvs-pop-to-buffer-same-frame (current-buffer))
+         (shrink-window-if-larger-than-buffer))))
     (if (not (or silent
                 (unwind-protect
                     (yes-or-no-p (format "Delete %d files? " (length files)))