bug-cvs
[Top][All Lists]
Advanced

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

Re: cvs misbehaves if .cvsrc file lines end in <CR><LF>


From: Mark D. Baushke
Subject: Re: cvs misbehaves if .cvsrc file lines end in <CR><LF>
Date: Fri, 31 Mar 2006 14:00:33 -0800

Hi Warren,

In future, it would be better to file your bug on the
savannah.nongnu.org website.

> >Description:
> 
>         I have found that if the .cvsrc file has <CR><LF> as the line
>         termination that cvs does not like that. Below is what it does.
> 
> /tools/wdtgnu/cvs-1.11.21/bin/cvs --version
> /tools/wdtgnu/cvs-1.11.21/bin/cvs: invalid option -- 
> Usage: cvs [cvs-options] command [command-options-and-arguments]
>   where cvs-options are -q, -n, etc.
>     (specify --help-options for a list of options)
>   where command is add, admin, etc.
>     (specify --help-commands for a list of commands
>      or --help-synonyms for a list of command synonyms)
>   where command-options-and-arguments depend on the specific command
>     (specify -H followed by a command name for command-specific help)
>   Specify --help to receive this message
> 
> The Concurrent Versions System (CVS) is a tool for version control.
> For CVS updates and additional information, see
>     the CVS home page at http://cvs.nongnu.org/
> 
> 
> I found this in the cygwin 1.11.17 version but tried it on linux also and get
> the same results.
> 
> It seems that the line termination should be able to be any CR or LF
> combination.
> 
> 
>         
> >How-To-Repeat:
> 
> This is my .csrc file and use <CR><LF> at the end of each line
> 
> diff   -rHEAD
> cvs    -q
> update -d

I have applied the following patch to the CVS STABLE sources and to the
CVS FEATURE sources.

The fix will be available in cvs-1.11.22 and cvs-1.12.14.

        Enjoy!
        -- Mark

Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/ChangeLog,v
retrieving revision 1.2336.2.432
retrieving revision 1.2336.2.433
diff -u -p -r1.2336.2.432 -r1.2336.2.433
--- ChangeLog   7 Mar 2006 20:04:37 -0000       1.2336.2.432
+++ ChangeLog   31 Mar 2006 19:48:30 -0000      1.2336.2.433
@@ -1,3 +1,8 @@
+2006-03-31  Mark D. Baushke  <mdb@gnu.org>
+
+       * cvsrc.c (read_cvsrc): Deal with \r\n (DOS) line endings in
+       .cvsrc files.
+
 2006-03-07  Derek Price  <derek@ximbiot.com>
 
        * tag.c (rtag_proc): Search the Attic when -F is used.
Index: cvsrc.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/cvsrc.c,v
retrieving revision 1.22.4.2
retrieving revision 1.22.4.3
diff -u -p -r1.22.4.2 -r1.22.4.3
--- cvsrc.c     31 Jan 2005 22:15:11 -0000      1.22.4.2
+++ cvsrc.c     31 Mar 2006 19:48:30 -0000      1.22.4.3
@@ -125,9 +125,9 @@ read_cvsrc (argc, argv, cmdname)
     if (found)
     {
        /* skip over command in the options line */
-       for (optstart = strtok (line + command_len, "\t \n");
+       for (optstart = strtok (line + command_len, "\t \n\r");
             optstart;
-            optstart = strtok (NULL, "\t \n"))
+            optstart = strtok (NULL, "\t \n\r"))
        {
            new_argv [new_argc++] = xstrdup (optstart);
          
Warren L Dodge <warrend@mdhost.cse.tek.com> writes:





reply via email to

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