bug-cvs
[Top][All Lists]
Advanced

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

[Adam Heath <address@hidden>] Bug#130595: cvs doesn't like files that st


From: Eric Gillespie
Subject: [Adam Heath <address@hidden>] Bug#130595: cvs doesn't like files that start with -
Date: Thu, 24 Jan 2002 23:27:20 -0500
User-agent: Gnus/5.090005 (Oort Gnus v0.05) XEmacs/21.5 (asparagus, i386-unknown-netbsdelf1.5.2)

I received the following bug report on the Debian cvs package.  I have
attached a patch which makes sure diff and commit get "--" before any
filenames so that they won't try to interpret filenames that begin
with dashes.  It's possible this needs to be fixed in other areas as
well.

src/client.c:
(send_files): Call send_arg("--") before sending files so that the
remote 'cvs ci' command doesn't think filenames that begin with dashes
are options.

src/rcscmds.c:
(RCS_merge): Call call_diff_arg("--") before passing the filenames so
the diff command doesn't think filenames that begin with dashes are
options.

(diff_exec): Same.

(diff_execv): Same.

-- 
Eric Gillespie, Jr. <*> epg@pretzelnet.org

"When everyone has to reinvent the wheel, many people invent
 square wheels."
--- Begin Message --- Subject: Bug#130595: cvs doesn't like files that start with - Date: Wed, 23 Jan 2002 17:16:52 -0600 (CST)
Package: cvs
Client-Version: 1.10.7-7
Server-Version: 1.11.1p1-1

===
adam@yakko:~/code/erector-set/tmp$ touch ./---bar
adam@yakko:~/code/erector-set/tmp$ cvs add ---bar
add: invalid option -- -
Usage: cvs add [-k rcs-kflag] [-m message] files...
        -k      Use "rcs-kflag" to add the file with the specified kflag.
        -m      Use "message" for the creation log.
(Specify the --help global option for a list of other help options)
adam@yakko:~/code/erector-set/tmp$ cvs add -- ---bar
cvs server: invalid option -- -
Usage: cvs server [-k rcs-kflag] [-m message] files...
        -k      Use "rcs-kflag" to add the file with the specified kflag.
        -m      Use "message" for the creation log.
(Specify the --help global option for a list of other help options)
adam@yakko:~/code/erector-set/tmp$ cvs add ./---bar
cvs server: scheduling file `./---bar' for addition
cvs server: use 'cvs commit' to add this file permanently
adam@yakko:~/code/erector-set/tmp$ cvs ci -m bar -- ---bar
cvs server: invalid option -- -
Usage: cvs server [-nRlf] [-m msg | -F logfile] [-r rev] files...
    -n          Do not run the module program (if any).
    -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)
adam@yakko:~/code/erector-set/tmp$ cvs ci -m bar -- ./---bar
cvs server: invalid option -- -
Usage: cvs server [-nRlf] [-m msg | -F logfile] [-r rev] files...
    -n          Do not run the module program (if any).
    -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)
adam@yakko:~/code/erector-set/tmp$ touch bar
adam@yakko:~/code/erector-set/tmp$ cvs add bar
cvs server: scheduling file `bar' for addition
cvs server: use 'cvs commit' to add this file permanently
adam@yakko:~/code/erector-set/tmp$ cvs ci -m bar bar ---bar
RCS file: /cvs/utils/erector-set/tmp/bar,v
done
Checking in bar;
/cvs/utils/erector-set/tmp/bar,v  <--  bar
initial revision: 1.1
done
RCS file: /cvs/utils/erector-set/tmp/---bar,v
done
Checking in ---bar;
/cvs/utils/erector-set/tmp/---bar,v  <--  ---bar
initial revision: 1.1
done
===

This causes real issues.  Any time '---bar' is changed, you can't check in the
modification, unless you ALSO modify some other normal file.






--- End Message ---

Attachment: cvs.diff
Description: Text Data


reply via email to

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