bug-cvs
[Top][All Lists]
Advanced

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

Re: Keyword substitution command options override binary status for repo


From: Mark D. Baushke
Subject: Re: Keyword substitution command options override binary status for repository files
Date: Fri, 06 Jun 2003 01:44:28 -0700

Hi Dieter,

Dieter Maurer <dieter.maurer@haufe.de> writes:

> I think, it is a well known problem that
> 
>  1.  binary files are implemented via a keyword substitution mode
> 
>  2.  keyword substitution command options override the binary status ("-kb") 
> for repository
>      files.

Yes, I believe this is TODO item 216:

| Avoid command-line keyword expansion modes overriding binary mode
| (or make binary mode completely separate from keyword expansion mode).

I do not object to the concept of the patch you have provided. If you
provide a patch for documentation and a some test cases for sanity.sh I
will vote +1 to include this patch on the trunk.

        Thanks,
        -- Mark

> This becomes a problem when one wants to use "-kk" on 
> "cvs update|checkout] -j ..." to get rid of stupid merge conflicts in
> keyword values. When such a command covers a binary file, the file can get 
> corrupted.
> 
> The attached patch prevents that a keyword substitution command option
> can override a "-kb" in the repository file. 
> It is still possible to change the keyword substitution mode for the 
> repository
> file with "cvs admin".
> 
> -- 
> Kind regards
> Dieter
> 
> 
> --------------Boundary-00=_8QV1I8XQCJXQ9Y9HRHMR
> Content-Type: text/x-diff;
>   charset="iso-8859-15";
>   name="cvs.pat"
> Content-Transfer-Encoding: 8bit
> Content-Description: Patch preventing keyword substitution command options to
>       override a repository files "-kb" (binary) Mode
> Content-Disposition: attachment; filename="cvs.pat"
> 
> diff -u -r1.1 -r1.2
> --- vers_ts.c   5 Mar 2003 14:19:27 -0000       1.1
> +++ vers_ts.c   27 May 2003 13:32:29 -0000      1.2
> @@ -129,6 +129,19 @@
>             }
>         }
>      }
> +    {
> +        /* DM: never override a "-kb" in the RCS File */
> +       if (finfo->rcs != NULL)
> +       {
> +           char *rcsexpand = RCS_getexpand (finfo->rcs);
> +           if (rcsexpand != NULL && rcsexpand[0] == 'b' && rcsexpand[1] == 0)
> +           {
> +               if (vers_ts->options != NULL)
> +                   free (vers_ts->options);
> +               vers_ts->options = xstrdup("-kb");
> +           }
> +       }
> +    }
>      if (!vers_ts->options)
>         vers_ts->options = xstrdup ("");
> 
> 
> --------------Boundary-00=_8QV1I8XQCJXQ9Y9HRHMR
> Content-Type: text/plain; charset="us-ascii"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> 
> _______________________________________________
> Bug-cvs mailing list
> Bug-cvs@gnu.org
> http://mail.gnu.org/mailman/listinfo/bug-cvs
> 
> --------------Boundary-00=_8QV1I8XQCJXQ9Y9HRHMR--
> 
> 





reply via email to

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