Commits

Anonymous committed 8b0d991

pcl-cvs 2.9.4-patch1 from Stefan Monnier

Comments (0)

Files changed (18)

 * Michale Kifer reports that sometimes the cvs process doesn't get killed
   when the *cvs* buffer gets killed.  This can then lead to error messages
   complaining the process' output buffer doesn't exist anymore.
+
+* vc-register doesn't update *cvs*
+
+#ident @(#)$Name$:$Id$
+1999-05-26  Stefan Monnier  <monnier@cs.yale.edu>
+
+	* pcl-cvs.el (cvs-run-process): close the process' stdin to avoid hangs.
+
+	* pcl-cvs-defs.el (cvs-lock-file-regexp): fixed.
+
+1999-05-15  Stefan Monnier  <monnier@cs.yale.edu>
+
+	* pcl-cvs-info.el (cvs-states): allow `update' in more cases.
+
+	* pcl-cvs.el (cvs-mode-imerge): fall back to vc-resolve-conflict.
+
+1999-04-22  Stefan Monnier  <monnier@cs.yale.edu>
+
+	* pcl-cvs-util.el (cvs-query-read): use read-string rather than
+	  completing-read if no completions are available.
+
+1999-03-26  Stefan Monnier  <monnier@cs.yale.edu>
+
+	* pcl-cvs.el (cvs-cmd-do,cvs-run-process): moved `save-some-buffers' to
+	  avoid calling it twice.
+	(cvs-mode-rtag): renamed to cvs-rtag and commented out.
+	(cvs-mode-untag): new.
+	(cvs-add-branch-prefix): use "-rTAG" instead of "-r TAG".
+	(cvs-mode-log): use branch-prefix.
+
+	* Makefile (install): don't install the .el files by default.
+
+1999-03-18  Stefan Monnier  <monnier@cs.yale.edu>
+
+	* pcl-cvs-info.el (cvs-action-face): change it to lightblue for dark-bg.
+
 1999-03-16  Stefan Monnier  <monnier@cs.yale.edu>
 
 	* pcl-cvs-parse.el: adapt the regexps to work with NT's `cvs.exe'.
+1. With what version of Emacs does PCL-CVS work ?
+
+  PCL-CVS should work with any recent (X)Emacs as well as on NTEmacs.
+  "recent" means something like "from 19.34 onward".  It might work with earlier
+  Emacsen, but if it doesn't we don't necessarily consider it as a bug.
+
+
+2. Faces don't quite work with Emacs-19.34
+
+  This is because 19.34 has an old version of custom.el which PCL-CVS
+  works around by disabling some of its code.  You can try installing
+  a newer version of custom.el from http://www.dina.kvl.dk/~abraham/custom/
+  or you can set up the faces in your own .emacs file.
+
+
+3. The TeXinfo document seems out-of-date and/or unclear!
+
+  Well spotted!  Please tell us what parts are outdated and give us
+  some sample replacement text for the unclear parts.
+
+
+4. How can I use Customize on Emacs 19.34 ?
+
+  The customize package bundled with 19.34 is out-dated and PCL-CVS
+  is only careful to work around it.  If you want better support, download
+  and install a newer customize from http://www.dina.kvl.dk/~abraham/custom/
+
+NN. My problem was not answered by this FAQ!
+
+  Maybe it will be answered by the BUGS file.  Else, you can always
+  send your gripes to the PCL-CVS mailing-list: pcl-cvs@cyclic.com.
+
+
+#ident @(#)$Name$:$Id$

FAQS

-1. With what version of Emacs does PCL-CVS work ?
-
-  PCL-CVS should work with any recent (X)Emacs as well as on NTEmacs.
-  "recent" means something like "from 19.34 onward".  It might work with earlier
-  Emacsen, but if it doesn't we don't necessarily consider it as a bug.
-
-
-2. Faces don't quite work with Emacs-19.34
-
-  This is because 19.34 has an old version of custom.el which PCL-CVS
-  works around by disabling some of its code.  You can try installing
-  a newer version of custom.el from http://www.dina.kvl.dk/~abraham/custom/
-  or you can set up the faces in your own .emacs file.
-
-
-3. The TeXinfo document seems out-of-date and/or unclear!
-
-  Well spotted!  Please tell us what parts are outdated and give us
-  some sample replacement text for the unclear parts.
-
-
-NN. My problem was not answered by this FAQ!
-
-  Maybe it will be answered by the BUGS file.  Else, you can always
-  send your gripes to the PCL-CVS mailing-list: pcl-cvs@cyclic.com.
-This text is copied from the TeXinfo manual for pcl-cvs.
+-*- text -*-
+
+Release 2.0.90 and later of PCL-CVS requires parts of the Elib library, version
+1.0 or later.  Elib can be downloaded from ftp://ftp.gnu.org/gnu/emacs, and
+from a lot of other mirror sites.  Get Elib, and install it, before proceeding.
+It's probably also available from where you downloaded PCL-CVS.
+
 
 Installation of the pcl-cvs program
 ===================================
      and `infodir'.  The elisp files will be copied to `lispdir', and
      the info file to `infodir'.
 
-  2. Configure pcl-cvs.el if you feel like it.
-     Though customize can be used as well.
+  2. Make sure you have already installed the Elib library.
 
-  3. Release 2.0.90 and later of pcl-cvs requires parts of the Elib
-     library, version 1.0 or later.  Elib is available via anonymous
-     ftp from prep.ai.mit.edu in `pub/gnu/elib-1.0.tar.z', and from
-     a lot of other sites that mirrors prep.  Get Elib, and install
-     it, before proceeding.  It's probably also available from where you
-     downloaded pcl-cvs.
-
-  4. Type `make install' in the source directory.  This will
-     byte-compile all `.el' files and copy both the `.el' and the
-     `.elc' into the directory you specified in step 1.
+  3. Type `make install' in the source directory.  This will
+     byte-compile all `.el' files and copy all the
+     `.elc' files into the directory you specified in step 1.
      It will also copy the info files (and add a corresponding entry to the
      info-dir file if install-info can be found).
 
-     If you don't want to install the `.el' files but only the `.elc'
-     files (the byte-compiled files), you can type ``make
-     install_elc'' instead of ``make install''.
+     If you want to install the `.el' files,
+     just type ``make install_el''.
 
      If you only want to create the compiled elisp files, but don't
      want to install them, you can type `make elcfiles' instead.
 
-  5. Edit the file `site-start.el' in your emacs lisp directory (usually
+  4. Edit the file `site-start.el' in your emacs lisp directory (usually
      `/usr/local/share/emacs/site-lisp' or something similar) and enter the
      contents of the file `pcl-cvs-startup.el' into it.  It contains
      a couple of `auto-load's that facilitates the use of pcl-cvs.
      Alternatively, you can just use `make install_startup'.
 
 
-Installation of the on-line manual.
-===================================
-
-  1. Create the info file `pcl-cvs' from `pcl-cvs.texi' by typing
-     `make info'.  If you don't have the program `makeinfo' you can
-     get it by anonymous ftp from e.g. `ftp.gnu.ai.mit.edu' as
-     `pub/gnu/texinfo-2.14.tar.Z' (there might be a newer version
-     there when you read this), or you could use the preformatted
-     info file `pcl-cvs.info' that is included in the distribution
-     (type `cp pcl-cvs.info pcl-cvs').
-
-  2. Move the info file `pcl-cvs' to your standard info directory.
-     This might be called something like `/usr/local/info'.
-
-  3. Edit the file `dir' in the info directory and enter one line to
-     contain a pointer to the info file `pcl-cvs'.  The line can, for
-     instance, look like this:
-
-          * Pcl-cvs: (pcl-cvs).       An Emacs front-end to CVS.
-
-
 How to make typeset documentation from pcl-cvs.texinfo
 ======================================================
 
    If you have TeX installed at your site, you can make a typeset
-manual from `pcl-cvs.texi'.
+manual from `pcl-cvs.texi' by typing ``make pcl-cvs.dvi''.  If you
+prefer a postscript version of this file, just use ``make pcl-cvs.ps''.
 
-  1. Run TeX by typing ``make pcl-cvs.dvi''.  You will not get the
-     indices unless you have the `texindex' program.
 
-  2. Convert the resulting device independent file `pcl-cvs.dvi' to a
-     form which your printer can output and print it.  If you have a
-     postscript printer there is a program, `dvi2ps', which does. 
-     There is also a program which comes together with TeX, `dvips',
-     which you can use.
-
+#ident @(#)$Name$:$Id$
 This is the NEWS file for pcl-cvs, an Elisp front-end to CVS.
 
-Chances from 2.9.2:
+Changes from 2.9.4:
+
+* ediff can now also be run on files which have not been merged
+  from within pcl-cvs.  This is currently achieved simply by using
+  VC's vc-resolve-conflict.
+
+* the branch-prefix now also applies to cvs-mode-log.
+
+* cvs-mode-untag has been added.
+
+Changes from 2.9.2 to 2.9.4:
 
 * tagging should finally work.
 
 * Pcl-cvs now creates temporary files in $TMPDIR if that environment
   variable is set (otherwise it uses /tmp).
 
----End of file NEWS---
+
+#ident @(#)$Name$:$Id$
-Pcl-cvs is a front-end to CVS.  It integrates the most
+PCL-CVS is a front-end to CVS.  It integrates the most
 frequently used CVS commands into emacs.
 
-For VC users, pcl-cvs can be thought of as a VC-dired specially designed
-for CVS.  Pcl-cvs is not a replacement for VC and is supposed to interact well
+For VC users, PCL-CVS can be thought of as a VC-dired specially designed
+for CVS.  PCL-CVS is not a replacement for VC and is supposed to interact well
 with it.  It provides a global view of your project and allows execution
 of cvs commands on several files at a time.
 
-This release of pcl-cvs requires Elib.  Elib is no
-longer distributed with pcl-cvs, since that caused too much confusion.
+This release of PCL-CVS requires Elib.  Elib is no
+longer distributed with PCL-CVS, since that caused too much confusion.
 You can get Elib from ftp.lysator.liu.se in pub/emacs/elib-*.tar.gz
-or any GNU ftp mirror site.
+or any GNU ftp mirror site.  You might also find a copy of Elib where
+you found this copy of PCL-CVS.
 
 See the file INSTALL for installation instructions.
 
-Full (and not quite up-to-date) documentation is in pcl-cvs.texinfo.
+Full (and not quite up-to-date) documentation is in pcl-cvs.texi.
 A preformatted info file is also included (pcl-cvs.info).
 
-If you have been using a previous version of pcl-cvs (for instance
+If you have been using a previous version of PCL-CVS (for instance
 1.02 which is distributed with CVS 1.3) you should read through the
 file NEWS to see what has changed.
 
+
 				Stefan Monnier
+
+
+#ident @(#)$Name$:$Id$
 -*- outline -*-
 
-* add page-up/page-down commands to browse the *cvs-diff* buffer
-	directly from the *cvs* buffer.
+* cvs-mode-revert-to-rev (maybe merged with cvs-mode-undo)
+	
+* make `g' and other commands use either cvs-update ot cvs-examine
+	depending on the read-only status of the cvs buffer, for instance.
+	
+* allow several cvs processes at the same time (cvs status during cvs update)
+	
+* cvs-rtag.  Try to be smart in the completion of modules.
+	
+* cvs-mode-rcs2log, cvs-rdiff, and cvs-release
+
+* cvs-mode-incorporate to merge in status of one *cvs* buffer into another.
+
+* cvs-mode-diff-other-{file,buffer,cvs-buffer}
+	
+* cvs-reread-cvsrc to reset the default args to the ones in the .cvsrc file.
+	
+* There needs to be a better way to run commands on individual files
+	while there are other files marked in the buffer
+	cvs-mode-toggle-marks does half the job, but leaves the mode of
+	the buffer in an invsible state.  Other commands for which this
+	kind of toggle would also be useful are "cvs status" and "cvs log".
 
 * add a `cvs abort' to kill the process.
 
 * cvs-mode-<foo> commands tend to require saving too many buffers
 	they should only require saving the files concerned by the command
 
-* add a `emptyness' message if the cookie list is empty
+* add an `emptyness' message if the cookie list is empty
 
 * split into smaller files
 
 * use VC's code a bit more
 	vc-cvs-release for instance (along with vc-release-greater-or-equal)
 
+* additional messages for the parser
+	cvs update: file lisp/cus-load.el is present in revision v20_3_9
+
+	
 * previous points
 
-** provide cvs-mode-rcs2log, cvs-mode-rdiff, and cvs-mode-release
-
-** prevent silly make-dir message when directory asked for by cvs-update
-doesn't end in a slash.
-
 ** documentation....  (esp. ChangeLog support)
 
-** write 'cvs-mode-import'
+** write 'cvs-import'
 
 ** write 'cvs-mode-handle-new-vendor-version'
 	- checks out module, or alternately does update join
 
 ** write 'cvs-mode-admin' to do arbitrary 'cvs admin' commands
 
-** add 'cvs patch' support (with completion on tag names and hooks to
+** add 'cvs rdiff' support (with completion on tag names and hooks to
 help generate ChangeLog files with rcs2log, etc.)
 
 ** add 'cvs export' support (with completion on tag names and hooks to
 help generate full releases)
 
-** add 'cvs-mode-version' to call 'cvs -v' [on ^C-cv ?] (really???)
-
 ** re-write rcs2log in e-lisp.
 
 ** add support for parsing 'modules' file ("cvs co -c")
 
-** enhance 'cvs-mode-rtag'
 
-** write 'cvs-mode-release'
-
-** add an update mode that keeps all files
-	this will require all commands to work only on non-up-to-date
-	files
+#ident @(#)$Name$:$Id$
 ;;; diff-mode.el
 
-(defconst rcsid-diff-mode "$Id")
+(defconst rcsid-diff-mode "@(#)$Name$:$Id$")
 
-;; Copyright (C) 1998  Stefan Monnier <monnier@cs.yale.edu>
+;; Copyright (C) 1998-1999  Stefan Monnier <monnier@cs.yale.edu>
 ;;
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
 ;; along with this program; if not, write to the Free Software
 ;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
+(require 'cl)
+(require 'pcl-cvs-compat)
+
 ;; Maybe I should try to merge that with Pavel Machek's patch-mode ?
 
 (defface diff-file-header-face

pcl-cvs-compat.el

 ;;; pcl-cvs-compat.el
 
-(defconst rcsid-pcl-cvs-compat "$Id")
+(defconst rcsid-pcl-cvs-compat "@(#)$Name$:$Id$")
 
 ;; Copyright (C) 1999  Stefan Monnier <monnier@cs.yale.edu>
 ;;
       (error "unknown keymap type"))
     (setf (cdr (last keymap)) parent)))
 
+(unless (fboundp 'set-face-bold-p)
+  (defun set-face-bold-p (face v &optional f)
+    (when v (ignore-errors (make-face-bold face)))))
+(unless (fboundp 'set-face-italic-p)
+  (defun set-face-italic-p (face v &optional f)
+    (when v (ignore-errors (make-face-italic face)))))
+
 ;; deal with custom-deprived Emacsen
 (ignore-errors (require 'custom))
 (unless (fboundp 'defgroup)
-  (defmacro defgroup (&rest rest) ())
-  (defmacro defcustom (sym val str &rest rest) `(defvar ,sym ,val ,str))
+  (defmacro defgroup (&rest rest) ()))
+(unless (fboundp 'defcustom)
+  (defmacro defcustom (sym val str &rest rest) `(defvar ,sym ,val ,str)))
+(unless (fboundp 'defface)
   (defmacro defface (sym val str &rest rest)
-    `(defvar ,sym
-       (let* ((face (make-face ',sym))
-	      (plist (car (cdr (car ,val))))
-	      (fg (plist-get plist ':foreground))
-	      (bold (plist-get plist ':bold)))
-	 (if fg (set-face-foreground face fg))
-	 (if bold (set-face-bold-p face bold))
-	 face)
-       ,str)))
+    `(defvar ,sym (-defface-intern ',sym ,val) ,str))
+  (defun -defface-display (val)
+    (let* ((frame-params (frame-parameters))
+	   (background (cdr (assq 'background-mode frame-params)))
+	   (class (cdr (assq 'display-type frame-params))))
+      (assoc-if
+       (lambda (cs)
+	 (or (eq cs t)
+	     (every (lambda (c)
+		      (ignore-errors (eq (eval (car c)) (cadr c))))
+		    cs)))
+       val)))
+  (defun -defface-intern (sym val)
+    (let* ((plist (cadr (-defface-display val)))
+	   (face (make-face sym)))
+      (dolist (prop '((:foreground set-face-foreground)
+		      (:background set-face-background)
+		      (:italic set-face-italic-p)
+		      (:bold set-face-bold-p)
+		      (:underline set-face-underline-p)))
+	(let ((v (plist-get plist (car prop))))
+	  (when v (ignore-errors (funcall (cadr prop) face v)))))
+      face)))
 
 ;; hopefully Emacs will end up providing this
 (unless (fboundp 'read-directory-name)
   (when (string-match (concat "^" cmd "\\s-\\(.*\\)$") cvsrc)
     (string->strings (substring cvsrc (match-beginning 1) (match-end 1)))))
 
+;; (defvar cvs-cvsrc->flags
+;;   '(("cvs" cvs-cvs-flags
+;;      (lambda (flags)
+;;        (cons "-f" (set-difference flags '("-q" "-Q") :test 'equal)))
+;; (defun cvs-read-cvsrc (cvsrc &optional nooverride)
+;;   "Read the .cvsrc file and set default flags accordingly."
+;;   (let ((cvsrc ((or (file-to-string (or cvsrc cvs-cvsrc-file)) ""))))
+;;     ))
+
 ;; read the cvsrc file.  This should really be a `let', but if I use
 ;; such a `let' enclosing the few defvars that follow, the compiler complains
 ;; that those vars are not known.
 ;; we also want to evict the annoying -q and -Q options that hide useful
 ;; information from pcl-cvs.
 (defvar cvs-cvs-flags (cons "-f"
-			    (set-difference (cvs-cvsrc-get "cvs" cvs-cvsrc)
-					    '("-q" "-Q") :test 'equal))
+			    (remove-if (lambda (x) (member x '("-q" "-Q")))
+				       (cvs-cvsrc-get "cvs" cvs-cvsrc)))
   "*The list of flags to pass to cvs.")
 
 (defvar cvs-update-cmd-flags (cvs-cvsrc-get "update" cvs-cvsrc)
   "*Non-nil if input buffers should be cleared before asking for new info.")
 
 (defcustom cvs-auto-remove-handled nil
-  "*Non-nil if cvs-mode-remove-handled should be called automatically.
+  "*Non-nil if cvs-emove-handled should be called automatically.
 If this is set to any non-nil value entries that does not need to be
 checked in will be removed from the *cvs* buffer after every command."
   :group 'pcl-cvs
   "Full path to a lock file that CVS is waiting for (or was waiting for).
 This variable is buffer local and only used in the *cvs* buffer.")
 
-(defvar cvs-lock-file-regexp "^#cvs.\\([trw]fl.[0-9]+\\|lock\\)\\'"
+(defvar cvs-lock-file-regexp "^#cvs\\.\\([trw]fl\\.[-.a-z0-9]+\\|lock\\)\\'"
   "Regexp matching the possible names of locks in the CVS repository.")
 
 (defconst cvs-cursor-column 22
 ;;(make-variable-buffer-local 'cvs-cookie-handle)
 
 (defconst cvs-startup-message
-  (if cvs-inhibit-copyright-message
-      (concat "PCL-CVS release " pcl-cvs-version)
-    (concat "PCL-CVS release " pcl-cvs-version
-	    ".  Copyright (C) 1991-1998 Per Cederqvist
-Pcl-cvs comes with absolutely no warranty; for details consult the manual.
+  (concat "PCL-CVS release " pcl-cvs-version
+	  (unless cvs-inhibit-copyright-message
+	    ".  Copyright (C) 1991-1999 Per Cederqvist
+PCL-CVS comes with absolutely no warranty; for details consult the manual.
 This is free software, and you are welcome to redistribute it under certain
 conditions; again, consult the Texinfo manual for details."))
   "*Startup message for CVS.")
     ["Interactively Merge"	cvs-mode-imerge			t]
     ["Interactively Diff"	cvs-mode-idiff                  t]
     ["Diff against Repository"	cvs-mode-diff			(cvs-enabledp 'diff)]
-    ["Diff against Backup"	cvs-mode-diff-backup		(cvs-enabledp 'diff-backup)]
+    ["Diff against Vendor"	cvs-mode-diff-vendor		t]
+    ["Diff against Backup"	cvs-mode-diff-backup		t]
     "----"
     ["Commit Changes"		cvs-mode-commit			(cvs-enabledp 'commit)]
     ["ChangeLog Commit Changes" cvs-mode-changelog-commit	(cvs-enabledp 'commit)]
 	       ("n" .	cvs-mode-next-line)
 	       ("p" .	cvs-mode-previous-line)
 	       ;; M- keys are usually those that operate on modules
-	       ("\M-C".	cvs-mode-rcs2log) ; i.e. "Create a ChangeLog"
-	       ("\M-t".	cvs-mode-rtag)
+	       ;;("\M-C".	cvs-mode-rcs2log) ; i.e. "Create a ChangeLog"
+	       ;;("\M-t".	cvs-rtag)
+	       ;;("\M-l".	cvs-rlog)
 	       ("\M-c".	cvs-checkout)
 	       ("\M-e".	cvs-examine)
 	       ("g" .	cvs-mode-revert-buffer)
 ;;; pcl-cvs-hooks.el
 
-(defconst rcsid-pcl-cvs-hooks "$Id")
+(defconst rcsid-pcl-cvs-hooks "@(#)$Name$:$Id$")
 
-;; Copyright (C) 1998  Stefan Monnier <monnier@cs.yale.edu>
+;; Copyright (C) 1998-1999  Stefan Monnier <monnier@cs.yale.edu>
 ;;
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
 
 (defface cvs-action-face
   '((((class color) (background dark))
-     (:foreground "blue4" :bold t))
+     (:foreground "lightblue" :bold t))
     (((class color) (background light))
      (:foreground "blue4"))
     (t ()))
 
 (defconst cvs-states
   `((NEED-UPDATE	update diff tag)
-    (UP-TO-DATE		nil remove diff safe-rm tag)
-    (MODIFIED		commit undo remove diff merge tag)
-    (ADDED		commit remove tag)
+    (UP-TO-DATE		update nil remove diff safe-rm tag)
+    (MODIFIED		update commit undo remove diff merge tag)
+    (ADDED		update commit remove tag)
     (NEED-REMOVE     	remove undo ,@removed tag)
     (REMOVED     	commit add undo ,@removed tag)
     (NEED-MERGE     	update undo diff tag)
   :type '(regexp :value "$"))
 
 (defcustom cvs-parse-ignored-messages
-  '("Executing ssh-askpass to query the password.*$")
+  '("Executing ssh-askpass to query the password.*$"
+    ".*Remote host denied X11 forwarding.*$")
   "*A list of regexps matching messages that should be ignored by the parser.
 Each regexp should match a whole set of lines and should hence be terminated
 by `$'."
 
      (SEQ
       (REGEXP "cvs[.ex]* \\[[a-z]+ aborted\\]:.*$")
-      (cvs-parsed-fileinfo 'MESSAGE nil))
+      (cvs-parsed-fileinfo 'MESSAGE ""))
      
      ;; sadly you can't do much with these since the path is in the repository
      (REGEXP "Directory .* added to the repository$")
        (REGEXP " *Sticky Options:[ \t]*\\(.*\\)$")) ; FIXME: use it
       t)
      (REGEXP "$")
+     ;; ignore the tags-listing in the case of `status -v'
+     (ALT (REGEXP " *Existing Tags:\n\\(\t.*\n\\)*\n$") t)
      (cvs-parsed-fileinfo type path nil
 			  :base-rev base-rev
 			  :head-rev head-rev))))

pcl-cvs-startup.el

-;; don't forget to add the pcl-cvs directory to your load-path
+;;;
+;;; sample autoload entries for your site-lisp/site-start.el file
+;;;
+
+;;#ident "@(#)$Name$:$Id$"
+
+;; don't forget to add the directory to your load-path
 (setq load-path (cons "@elcdir@" load-path))
 
+;; make sure the mode is loaded when necessary
 (autoload 'cvs-update "pcl-cvs" "autoloaded pcl-cvs command" t)
 (autoload 'cvs-examine "pcl-cvs" "autoloaded pcl-cvs command" t)
 (autoload 'cvs-status "pcl-cvs" "autoloaded pcl-cvs command" t)
 ;;; pcl-cvs-util.el
 
-(defconst rcsid-pcl-cvs-util "$Id")
+(defconst rcsid-pcl-cvs-util "@(#)$Name$:$Id$")
 
 ;; Copyright (C) 1998-1999  Stefan Monnier <monnier@cs.yale.edu>
 ;;
 	 (initval (funcall (cvs-qtypedesc->obj2str qtypedesc)
 			   (symbol-value sym))))
     (funcall (cvs-qtypedesc->str2obj qtypedesc)
-	     (completing-read prompt completions nil nil initval hist-sym))))
+	     (if (not complete)
+		 (read-string prompt initval hist-sym)
+	       (completing-read prompt completions nil nil initval hist-sym)))))
 
 (defun cvs-query-flags (sym desc &optional qtypedesc hist-sym query)
   (if (or current-prefix-arg query)
       (mode-motion-highlight-line event)))
 
 (defun cvs-enabledp (filter)
+  "Determines whether FILTER applies to at least one of the selected files."
   (let-and ((c cvs-cookie-handle)
 	    (marked (cvs-get-marked (cvs-ignore-marks-p
 				     cvs-default-ignore-marks))))
   "Add branch selection argument if the prefix was set."
   (let ((branch (cvs-get-prefix 'cvs-branch-prefix)))
     (if branch
-	(list* "-r" branch flags)
+	(cons (concat "-r" branch) flags)
       flags)))
 
 ;;----------
 	 (args (append cvsargs
 		       (list cmd)
 		       cmdargs)))
+    (save-some-buffers)
     ;; Check that dir is under CVS control.
     (unless (file-directory-p dir)
       (error "%s is not a directory." dir))
 ;;----------
 (defun cvs-run-process (args fis postprocess &optional single-dir)
   (assert (cvs-buffer-p cvs-buffer))
-  (save-some-buffers)
   (save-excursion
     (let ((procbuf (current-buffer))
 	  (buffer cvs-buffer)
 	  (set-process-filter process 'cvs-update-filter)
 	  (set (make-local-variable 'cvs-process) process)
 	  (set-marker (process-mark cvs-process) (point-max))
+	  (process-send-eof process)	;close its stdin to avoid hangs
 	
 	  ;; now finish setting up the cvs-buffer
 	  (set-buffer buffer)
 ;;----------
 ;;;###autoload
 (defun cvs-examine (directory flags &optional noshow)
-  "Run a 'cvs -n update' in the specified directory.
+  "Run a `cvs -n update' in the specified directory.
 That is, check what needs to be done, but don't change the disc.
 Feed the output to a *cvs* buffer and run cvs-mode on it.
-With a prefix argument, prompt for cvs flags to use."
+With a prefix argument, prompt for a directory and cvs flags to use."
   (interactive (list (cvs-query-directory "CVS Examine (directory): ")
 		     (cvs-query-flags 'cvs-update-cmd-flags "cvs -n update flags")))
   (when (eq flags t) (setf flags cvs-update-cmd-flags))
 ;;----------
 ;;;###autoload
 (defun cvs-update (directory flags)
-  "Run a 'cvs update' in the current working directory.
+  "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 cvs flags to use."
+With a prefix argument, prompt for a directory and cvs flags to use."
   (interactive (list (cvs-query-directory "CVS Update (directory): ")
 		     (cvs-query-flags 'cvs-update-cmd-flags "cvs update flags")))
   (if (eq flags t) (setf flags cvs-update-cmd-flags))
 ;;----------
 ;;;###autoload
 (defun cvs-status (directory flags &optional noshow)
-  "Run a 'cvs status' in the current working directory.
+  "Run a `cvs status' in the current working directory.
 Feed the output to a *cvs* buffer and run cvs-mode on it.
-
-With a prefix argument, prompt for cvs flags to use."
+With a prefix argument, prompt for a directory and cvs flags to use."
   (interactive (list (cvs-query-directory "CVS Status (directory): ")
 		     (cvs-query-flags 'cvs-status-cmd-flags "cvs status flags")))
   (if (eq flags t) (setf flags cvs-status-cmd-flags))
     (unless (and fi (cvs-applicable-p fi 'merge))
       (error "There is no file to merge."))
     (let ((merge (cvs-fileinfo->merge fi))
+	  (file (cvs-fileinfo->full-path fi))
 	  (backup-file (cvs-fileinfo->backup-file fi)))
-      (unless (and merge backup-file)
-	(error "Missing merge info or backup file."))
-      (let* ((file (cvs-fileinfo->full-path fi))
-	     (ancestor-buf (cvs-retrieve-revision fi (car merge)))
-	     (head-buf (cvs-retrieve-revision fi (cdr merge)))
-	     (backup-buf (find-file-noselect backup-file))
-	     ;; this binding is used by cvs-ediff-startup-hook
-	     (cvs-temp-buffers (list ancestor-buf backup-buf head-buf)))
-	(funcall (cdr cvs-idiff-imerge-handlers)
-		 backup-buf head-buf ancestor-buf file)))))
+      (if (not (and merge backup-file))
+	  (let ((buf (find-file-noselect file)))
+	    (message "Missing merge info or backup file, using VC.")
+	    (save-excursion
+	      (set-buffer buf)
+	      (vc-resolve-conflicts)))
+	(let* ((ancestor-buf (cvs-retrieve-revision fi (car merge)))
+	       (head-buf (cvs-retrieve-revision fi (cdr merge)))
+	       (backup-buf (find-file-noselect backup-file))
+	       ;; this binding is used by cvs-ediff-startup-hook
+	       (cvs-temp-buffers (list ancestor-buf backup-buf head-buf)))
+	  (funcall (cdr cvs-idiff-imerge-handlers)
+		   backup-buf head-buf ancestor-buf file))))))
 
 (defun cvs-mode-idiff (pos &optional rev)
   "Diff interactively current file to revisions."
   "Display the cvs log of all selected files.
 With prefix argument, prompt for cvs flags.
 Can only be used in the *cvs* buffer."
-  (interactive (list (cvs-query-flags 'cvs-log-flags "cvs log flags")))
+  (interactive (list (cvs-add-branch-prefix
+		      (cvs-query-flags 'cvs-log-flags "cvs log flags"))))
   (cvs-mode-do "log" flags nil :show t))
 
 ;;----------
 ;;----------
 (defvar cvs-tag-name "")
 (defun cvs-mode-tag (tag &optional flags)
-  "Run `cvs tag' on all selected files.
+  "Run `cvs tag TAG' on all selected files.
 With prefix argument, prompt for cvs flags."
   (interactive
    (list (cvs-query-flags 'cvs-tag-name "Tag name" cvs-qtypedesc-tag nil t)
 	 (cvs-query-flags 'cvs-tag-flags "tag flags")))
   (cvs-mode-do "tag" (append flags (list tag)) 'tag :ignore-contents t))
 
+(defun cvs-mode-untag (tag &optional flags)
+  "Run `cvs tag -d TAG' on all selected files.
+With prefix argument, prompt for cvs flags."
+  (interactive
+   (list (cvs-query-flags 'cvs-tag-name "Tag to delete" cvs-qtypedesc-tag nil t)
+	 (cvs-query-flags 'cvs-tag-flags "tag flags")))
+  (cvs-mode-do "tag" (append '("-d") flags (list tag)) 'tag :ignore-contents t))
+  
 
 ;;----------
 ;; FIXME: this is bogus since it passes to `cvs rtag' a module name and
 ;; a list of files, whereas `cvs rtag' expects only a list of modules
-(defun cvs-mode-rtag (modules tag &optional flags)
-  "Run `cvs rtag' on all selected files.
-With prefix argument, prompt for cvs flags."
-  (interactive (list (string->strings (read-string "Module(s): "))
-		     (string->strings (read-string "Tag name: "))
-		     (cvs-query-flags 'cvs-tag-flags "tag flags")))
-  (cvs-mode-do "rtag" (append flags (list tag) modules) nil))
+;; (defun cvs-rtag (modules tag &optional flags)
+;;   "Run `cvs rtag' on all selected files.
+;; With prefix argument, prompt for cvs flags."
+;;   (interactive (list (string->strings (read-string "Module(s): "))
+;; 		     (string->strings (read-string "Tag name: "))
+;; 		     (cvs-query-flags 'cvs-tag-flags "tag flags")))
+;;   (cvs-mode-do "rtag" (append flags (list tag) modules) nil))
 
 ;; Byte compile files.
 
 \input texinfo  @c -*-texinfo-*-
 
-@comment pcl-cvs.texinfo,v 1.49 1996/11/05 16:00:56 woods Exp
+@comment "@(#)$Name$:$Id$"
+
 @comment Documentation for the GNU Emacs CVS mode.
-@comment Copyright (C) 1991-1995  Per Cederqvist
+@comment Copyright (C) 1991-1999  Per Cederqvist
 
 @comment This file is part of the pcl-cvs distribution.
 
 @setfilename pcl-cvs.info
 @settitle Pcl-cvs - The Emacs Front-End to CVS
 @direntry
- * Pcl-cvs::            Emacs front-end to CVS
+* Pcl-cvs:(pcl-cvs).	Emacs front-end to CVS
 @end direntry
 @setchapternewpage on
      
 
 As of January 1996, the original author of pcl-cvs, Per Cederqvist, is
 no longer maintaining pcl-cvs and responsibility has been passed to the
-PCL-CVS Trust.  @xref{Bugs} for how to contact us.
+PCL-CVS Trust, see @xref{Bugs}.
 
 As of this writing, there are several versions of pcl-cvs available on
 the net.  First, there is the old pcl-cvs version 1.05 distributed with
 This scheme might seem a little complicated, but once one get used to
 it, it is quite powerful.
 
-@xref{Marking files} for commands to mark and unmark files.
+For commands to mark and unmark files, see @xref{Marking files}.
 
 @node Commands, Customization, Buffer contents, Top
 @comment  node-name,  next,  previous,  up
 command, any marked files will not be considered to be selected.
 
 Also, you can get a context- or unified diff by setting
-@samp{cvs-diff-flags}.  @xref{Customization} and also
+@samp{cvs-diff-flags}.  @xref{Customization}, and also
 @ref{Setting flags}.
 
 
 
 @section Tagging files
 @findex cvs-mode-tag
-@findex cvs-mode-rtag
+@findex cvs-mode-untag
+@findex cvs-rtag
 @cindex Tagging files
 @kindex M-t - repository tag files
 @kindex t - tag files
 @cindex Automatically sorting .cvsignore
 
 If you have an idea about any customization that would be handy but
-isn't present in this list, please tell me!  @xref{Bugs} for info on how
-to reach me.@refill
+isn't present in this list, please tell me!
+For info on how to reach me, see @xref{Bugs}.@refill
 
 @table @samp
 @item cvs-erase-input-buffer
 
 If you miss something in this wish-list, let me know!  I don't promise
 that I will write it, but I will at least try to coordinate the efforts
-of making a good Emacs front end to CVS.  @xref{Bugs} for
-information about how to reach me.@refill
+of making a good Emacs front end to CVS.
+For information about how to reach me, see @xref{Bugs}.@refill
 
 So far, I have written most of pcl-cvs in my all-to-rare spare time. If
 you want pcl-cvs to be developed faster you can write a contract with