changeset 42966:afd482080b6f

(cvs-reread-cvsrc): Distinguish between an empty list of args and the absence of an entry. Don't add -f each time.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 25 Jan 2002 22:41:28 +0000
parents ae80d436474e
children 51ac72369873
files lisp/pcvs.el
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/pcvs.el	Fri Jan 25 18:47:33 2002 +0000
+++ b/lisp/pcvs.el	Fri Jan 25 22:41:28 2002 +0000
@@ -13,7 +13,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.31 2001/12/02 07:40:43 monnier Exp $
+;; Revision: $Id: pcvs.el,v 1.32 2001/12/20 18:43:35 pj Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -180,16 +180,16 @@
 	(dolist (cmd '("cvs" "checkout" "status" "log" "diff" "tag"
 		       "add" "commit" "remove" "update"))
 	  (goto-char (point-min))
-	  (let* ((sym (intern (concat "cvs-" cmd "-flags")))
-		 (val (when (re-search-forward
-			     (concat "^" cmd "\\s-+\\(.*\\)$") nil t)
-			(cvs-string->strings (match-string 1)))))
-	    (cvs-flags-set sym 0 val)))
+	  (when (re-search-forward
+		 (concat "^" cmd "\\(\\s-+\\(.*\\)\\)?$") nil t)
+	    (let* ((sym (intern (concat "cvs-" cmd "-flags")))
+		   (val (cvs-string->strings (or (match-string 2) ""))))
+	      (cvs-flags-set sym 0 val))))
 	;; ensure that cvs doesn't have -q or -Q
 	(cvs-flags-set 'cvs-cvs-flags 0
 		       (cons "-f"
 			     (cdr (cvs-partition
-				   (lambda (x) (member x '("-q" "-Q")))
+				   (lambda (x) (member x '("-q" "-Q" "-f")))
 				   (cvs-flags-query 'cvs-cvs-flags
 						    nil 'noquery))))))
       (file-error nil)))