My capability of reading perl scripts without getting fits of agony is limited (at least you are one of the few perl programmers that know that the language actually supports line breaks and indentation
), so please be patient with me if I don't understand correctly what it's doing.
Isn't it that this script opens a source file, parses it line by line, and fills in the revision number that it got from svn?
That's exactly what
keyword substitution does. However, keyword substitution is portable and reliable, unlike all home-made implementations.
If you regularly read the forums, then you'll have read how much pain we are having with the
autorevision tool. This is another home-brewn tool doing stuff that actually the revision control system should do, and would probably do better in many places.
The reason why I made
autorevision in the first place was that we wanted to have
one revision number for the whole project which is the latest revision of
all files. Keyword substitution takes the per-file revision number (as your tool does, too), which is unluckily not the best thing to use for displaying a revision number in the about box (to work around, one would have to mark one file dirty in every commit, but that's even worse!).
Also,
autorevision provides a fallback functionality for users who don't have
svn installed, which is causing more problems than it is actually worth (because of localisation/languages/encodings).
All in all, I can only say that there are many good reasons for using keyword substitution, and few good reason to use anything else. And if you use anything else, my experience is that it causes problems sooner or later.