[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

vc uses 1 set of switches for all back ends

From: Syd Bauman
Subject: vc uses 1 set of switches for all back ends
Date: Sun, 30 Jan 2005 16:51:17 -0500 (EST)

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 address@hidden 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' 
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.

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 :-).

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 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 <return> C-u C-x C-b C-x t i <return> 
M-x C-g C-h f v c - <tab> <backspace> <tab> <tab> <return> 
- b a k <backspace> c k <tab> <return> C-x o <tab> 
<return> M-< C-x 1 C-x t o <return> C-x C-f v c . <tab> 
<return> C-s b u g C-s C-v C-s C-s C-s C-s M-x b u 
g <tab> M-x C-g C-h a b u g <return> C-x 0 M-x M-p 
<return> M-x C-g C-h a [ ^ e ] b u g <return> M-x r 
e p o <tab> r <tab> <return>

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]