Hi.
When an empty .cvsrc is found all the pcl-cvs standard args are set to
empty. I don't consider this the right behaviour.
I think it should be as follows:
1) if there are arguments found .cvsrc use those
1a) special case: If a command is found in .cvsrc with no arguments
then use no arguments for that command
2) for those commands that is *not* configured in .cvsrc use pcl-cvs
original defaults.
Comments on this behaviour is welcome.
To provoke the situation create an empty .cvsrc and compare behaviour
of (say diff `=' in cvs-mode ) to the situation where .cvsrc does not exist.
I have made a patch to fix this, but it still need some work, since
re-reading of .cvsrc will not reset the pcl-<command>-flags to the
original defaults initialised with
`(cvs-flags-define cvs-<command>-flags (cvs-defaults LIST))'
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/pcl-cvs/pcl-cvs.el,v
retrieving revision 2.39
diff -u -r2.39 pcl-cvs.el
--- pcl-cvs/pcl-cvs.el 2001/12/21 06:25:16 2.39
+++ pcl-cvs/pcl-cvs.el 2002/01/22 08:22:11
ï¼ ï¼ -118,10 +118,18 ï¼ ï¼
(dolist (cmd '("cvs" "checkout" "status" "log" "diff" "tag"
"add" "commit" "remove" "update"))
(let* ((sym (intern (concat "cvs-" cmd "-flags")))
- (val (when (string-match (concat "^" cmd "\\s-\\(.*\\)$") cvsrc)
- (cvs-string->strings (match-string 1 cvsrc)))))
- (cvs-flags-set sym 0 val)))
- ;; ensure that cvs doesn't have -q or -Q
+ (params (when (string-match (concat "^" cmd "\\(\\s-+\\(.*\\)\\)?$") cvsrc)
+ (cvs-string->strings (or (match-string 2 cvsrc) ""))
+ )))
+ (if params
+ (cvs-flags-set sym 0 (if (equal params '("")) nil params ))
+ ;;FIXME: Otherwise set the flags to the original pcl-cvs
+ ;;default params here in the else part. /jarl
+ )
+ ))
+ ;; Ensure that cvs doesn't have -q or -Q and ensure to have the -f
+ ;; FIXME: several invokes of `cvs-reread-cvsrc' will have many
+ ;; "-f" options, this doesn't hurt but it's not beautiful. /jarl
(cvs-flags-set 'cvs-cvs-flags 0
(cons "-f"
(cdr (cvs-partition
===================================================================