Today I had planned to fix a small issue that - not unexpectedly - was caused by the migration of Subversion repositories from my trusty Compaq SR1505LA, running Windows XP, to my Dell Vostro 200 ST, running Ubuntu 8.04 LTS: after I had checked out the repository for this site, all files got new timestamps. While this might not be a problem in general, it was for some of my files, namely the ones containing the Perl programs (or other source code) I include in HTML pages on this site, mainly in the Perl help, examples, and tutorials section. When I generate the over 2,200 HTML 4.01 strict web pages for this web site from over 70 XML files, using an in-house developed Perl program, the timestamp of some files that are included are used to add a "last updated" comment. And due to the changed check out date (and time), this was now no longer correct.
At first I was considering to use the touch
command to set the timestamps
back to the same value as on the Compaq, using the values shown after Last updated in the
code samples on my site. But that looked like too much work. After some reading
on the Internet, I was looking for an easy way to get a timestamp from Subversion itself,
I came upon Subversion properties. After some more reading I decided to use the svn:keywords
property to have Subversion automatically insert dynamic information, including a
time stamp, using keyword substitution in files containing the code examples. While the "last updated" would
still be wrong, it would become right soon; I've plans to review all the Perl programs
published on this site, and update each to follow closer the coding style promoted in
"Perl Best Practices", which is one of the
five must have Perl books.
In my opinion, that is.