|
From: | Frederic Brehm |
Subject: | Re: [Fwd: Q on keyword substitution] |
Date: | Tue, 11 Jan 2005 08:53:21 -0500 |
User-agent: | Mozilla Thunderbird 1.0 (Windows/20041206) |
Pierre Asselin wrote:
Well, suppose you edit the file and add a line with a '$Rvision' marker, misspelled. You commit that, the bad marker goes in the repository. You check out or update, the keyword is not expanded/clobbered because of the spelling error. The information you need is still present in the repository and you can still see it, e.g. with 'cvs annotate', but someone will have to edit the file and manually correct the bad line.
If you are going to depend on the expansion of a keyword, then your process should specify a check that the keyword is expanded correctly immediately after a commit. Your local file will have the expansion. If it doesn't, then correct the misspelling and try again.
My suggestion was to use a spelling that can be checked by a utility, and to enforce that check in a commitinfo hook.
You can do that anyway. Just make a commitinfo hook that tries to find the string '$Revision: ' in the file. Of course, that leads to extra configuration management work because you probably want to exclude some files from the check. That, of course, can lead to more errors.
You still need pay attention to process. Fred -- Frederic W. Brehm, Sarnoff Corporation, http://www.sarnoff.com/
[Prev in Thread] | Current Thread | [Next in Thread] |