CVS–Concurrent Versions System – Keyword substitution

CVS–Concurrent Versions System – Keyword substitution

CVS Keyword substitution

As long as you edit source files inside your working copy of a module you can always find out the state of your files via `cvs status’ and `cvs log’. But as soon as you export the files from your development environment it becomes harder to identify which revisions they are.

CVS can use a mechanism known as keyword substitution (or keyword expansion) to help identifying the files. Embedded strings of the form $keyword$ and $keyword:…$ in a file are replaced with strings of the form $keyword:value$ whenever you obtain a new revision of the file.

So, to add the $Id: filename.html,v 1.3 2004/05/10 21:22:53 gserafini Exp $ info into a file, just add $Id$ once to the file. CVS will expand this and then keep it updated whenever you check in a file. I’d been wondering about this one for a while… :)

Leave a Reply