Re: rcs tags and tests
Derek Robert Price <[email protected]> Tue, 04 Feb 2003 08:35:00 -0500
| Newsgroups | gmane.comp.tex.texi2html.devel |
|---|---|
| Organization | Ximbiot <http://ximbiot.com> |
| Message-ID | <[email protected]> |
Dumas Patrice wrote:
>Hi,
>
>I am having troubles with the regression tests, because I get false negatives
>in case there was, in the original file a tag like:
>
>$Id: texinfo.txi,v 1.219 2002/03/28 16:36:00 karl Exp $
>
>When I commited to cvs it became
>
>$Id: texinfo.txi,v 1.1 2003/02/03 16:10:29 pertusus Exp $
>
Actually, keyword replacement happens on checkout.
>What could I do to avoid that kind of wrong behaviour ?
>
>Pat
>
>Note: the $Id: texinfo.txi,v 1.219 2002/03/28 16:36:00 karl Exp $ comes from
>the texinfo manual. From an example if I recall well.
>
>
There are several ways to deal with it:
1. Remove the string from the file. Easiest, but not always desirable.
2. Checkout using the -kk option to checkout or update before running
your tests. This will reduce the string above to $Id$, as well as
reducing any other RCS keyword strings found to keywords only.
This leaves the -kk option stuck to the files in your sandbox so
a new update with -A specified is required to restore the keywords
and checkins will check in the new string. This mode can corrupt
binaries you may have checked in. Clunky, but sometimes workable.
3. Checkout using the -kb options to checkout or update. As clunky
as 2, but -kb won't corrupt binaries - not sure it won't cause
problems when you go to check text files back in.
4. As 2 & 3, but -ko. Still clunky, but I think it may avoid
corruption problems from both 2 & 3.
5. The optimal solution, if you can work it out: insert a
non-printing character in the source file after the first $ in the
string. For example, in texinfo files, I usually use @asis{}, so
your example will look like:
$@asis{}Id: texinfo.txi,v 1.219 2002/03/28 16:36:00 karl Exp $
Again, I prefer solution 5 when it can be worked out. You should be
able to find some examples in the CVS Manual.
There is an interesting twist with generating HTML in the CVS manual.
The calls to @asis{} are used to break up some RCS keywords which are
intended to print, but if you want to check the HTML output back into
CVS, the keywords get replaced on checkout of the HTML. @asis{}, in
this case would need to be replaced by texi2html with something that
doesn't print in HTML. (Replacing @asis{} wouldn't be optimal - Issue
#3 for examples of an alternative:
<http://texi2html.cvshome.org/issues/show_bug.cgi?id=3>.)
Derek
--
*8^)
Email: [email protected]
Get CVS support at <http://ximbiot.com>!
--
The man who reads nothing at all is better educated than the man who reads
nothing but newspapers.
- Thomas Jefferson (1743-1826)