I have a lot of jsp files in CVS that are not compilable files. (e.g. *.html, *.jsp etc).
I use the following template on each new file that is checked in to cvs.
This means that whenever a file is update or modified and then checked in, a log is appended to the cvs history section of the jsp page at the top of the page . Here is an example
Now this is working very well. The only problem is that with pages that are not compilable, the revision history is also visible. For example on JSP pages, the cvs history is included in each page as html comments. So on the browser, if someone selects "View Source", they can view the source of the html/jsp page and the revision history of the page.
Is there a way to remove the revision history before deployment? I know i can use some unix tools like grep and cut to remove the revision history but i have a feeling it wont be a simple job to determine whether its a real comment or a cvs history comment. Is there an easier way to do this?
its fine with compilable files e.g. (.java, .c etc) as these are not visible to the user as they run on the server side.
They're not visible because they're in comments, not because it's run on the server side.
JSPs, by the way, *are* compilable, and you can put the CVS comments in JSP comments as well. HTML, not so much; there are any number of ways to remove them including CVS hooks, deployment/build filtering, and so on. Depending on how they're being added (for instance, by looking for placeholders on checkin) you might just be able to remove the placeholder and it will no longer be added--so you'd do that for the HTML files.
All that said, I wouldn't bother putting that information in the files at all: it's noisy, doesn't provide any information you can't already get, putting the information in only *some* file types defeats the purpose, and is a relic of an earlier time.