From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Syd Bauman Newsgroups: gmane.emacs.bugs Subject: vc uses 1 set of switches for all back ends Date: Sun, 30 Jan 2005 16:51:17 -0500 (EST) Message-ID: <200501302151.j0ULpHOw003307@ursa.services.brown.edu> Reply-To: Syd_Bauman@Brown.edu NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1107122338 7044 80.91.229.6 (30 Jan 2005 21:58:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 30 Jan 2005 21:58:58 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 30 22:58:52 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CvN5n-0006uv-00 for ; Sun, 30 Jan 2005 22:58:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CvNIO-0007jZ-7o for geb-bug-gnu-emacs@m.gmane.org; Sun, 30 Jan 2005 17:11:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CvNEQ-0006Ow-71 for bug-gnu-emacs@gnu.org; Sun, 30 Jan 2005 17:07:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CvNEF-0006IG-7i for bug-gnu-emacs@gnu.org; Sun, 30 Jan 2005 17:07:36 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CvNED-0006GV-Q2 for bug-gnu-emacs@gnu.org; Sun, 30 Jan 2005 17:07:33 -0500 Original-Received: from [128.148.106.152] (helo=ursa.services.brown.edu) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CvMyc-0001dX-Es for bug-gnu-emacs@gnu.org; Sun, 30 Jan 2005 16:51:26 -0500 Original-Received: from emt.wwp.brown.edu ([128.148.157.110]) by ursa.services.brown.edu (Switch-3.1.3/Switch-3.1.0/) with ESMTP id j0ULpHOw003307; Sun, 30 Jan 2005 16:51:19 -0500 (EST) Original-To: bug-gnu-emacs@gnu.org X-Brown-Proofpoint: Not Infected X-Proofpoint-Spam-Details: rule=notspam policy= score=0 mlx=-1 adultscore=0 adjust=0 engine=2.5.0-05012802 definitions=2.5.0-05012900 X-Brown-MailScanner-SpamCheck: not spam, rule=notspam policy= score=0 mlx=-1 adultscore=0 adjust=0 engine=2.5.0-05012802 definitions=2.5.0-05012900 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:10631 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:10631 This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English, because the Emacs maintainers do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. In GNU Emacs 21.3.1 (powerpc-unknown-linux-gnu, X toolkit, Xaw3d scroll bars) of 2004-10-16 on voltaire, modified by Debian configured using `configure '--build=powerpc-linux' '--host=powerpc-linux' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--with-x=yes' '--with-x-toolkit=athena' 'CFLAGS=-DDEBIAN -g -O2' 'build_alias=powerpc-linux' 'host_alias=powerpc-linux'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil locale-coding-system: nil default-enable-multibyte-characters: t Please describe exactly what actions triggered the bug and the precise symptoms of the bug: Executive Summary --------- ------- vc uses the same checkin switches for both RCS and CVS, but the two commands take very different command-line switches. Actions/Symptoms ---------------- I use GNU Emacs 21.3.1 on a Debian "sarge" GNU/Linux system. I have been using RCS via 'vc.el' for years. In my .emacs the variable `vc-checkin-switches' is set (to "-zLT", because I can't stand having almost, but not quite, ISO-format dates, if you're interested). A project I work on recently moved to Sourceforge, so I've started to use CVS for those files in addition to RCS for my local projects. When I try to check a file in (aka commit) to cvs using C-x v v with a modified file under CVS control as the front active buffer, I get an error message that "-z" is not a valid switch: | ci: invalid option -- z | Usage: cvs commit [-Rlf] [-m msg | -F logfile] [-r rev] files... | -R Process directories recursively. | -l Local directory only (not recursive). | -f Force the file to be committed; disables recursion. | -F logfile Read the log message from file. | -m msg Log message. | -r rev Commit to this branch or trunk revision. | (Specify the --help global option for a list of other help options) I have had some other problems using CVS from within Emacs, but the inability to commit a file was a showstopper, so I investigated this one. It turns out that vc.el defines one variable, vc-checkin- switches, for use with all back ends, but does not provide a mechanism for giving it a different value with each back end (at least, not one I found :-). Hack-around ----------- This may not be the right way to do this, but it does seem to work. (defun syd-set-vc-checkin-switches () (if (equal (vc-backend file) 'RCS) (setq vc-checkin-switches "-zLT") (setq vc-checkin-switches nil)) ) (custom-set-variables ;; custom-set-variables was added by Custom -- don't edit or cut/paste it! ;; Your init file should contain only one such instance. '(vc-before-checkin-hook (quote (syd-set-vc-checkin-switches))) Recent input: C-x C-q C-x b C-u C-x C-b C-x t i M-x C-g C-h f v c - - b a k c k C-x o M-< C-x 1 C-x t o C-x C-f v c . C-s b u g C-s C-v C-s C-s C-s C-s M-x b u g M-x C-g C-h a b u g C-x 0 M-x M-p M-x C-g C-h a [ ^ e ] b u g M-x r e p o r Recent messages: Note: file is write protected Mark saved where search started [2 times] call-interactively: Quit [2 times] Loading apropos...done Type C-x 1 to remove help window. C-M-v to scroll the help. next-history-element: Beginning of history; no preceding item call-interactively: No command name given call-interactively: Quit Making completion list... Loading emacsbug...done