Is there a way to enable svn:keywords by default so that this property does not need to be turned on for each keyword every time a new source file is added?
As mentioned above, you can use auto-properties to do this, but you should ask yourself one big question:
When you are doing development, you can easily use the various svn
commands to get you any information that would be stored in the keywords, so this really isn't necessary.
Some people claim that keywords are necessary once the software is on the customer site, but there are better mechanisms to use for validating what revision of your software you are using. For example, during the compilation, you could create a file with a more meaningful revision ID (Maybe the release number and build date) and display this as sort of an "about box". The ID is more meaningful.
I also know I can't trust the keywords contained in shell scripts that might be in a customer site. The shell script might say a revision number, but the shell script could have been edited.
If you really, really need this, and it's something that needs to be enforced on your site, you'll need a pre-commit trigger to fail when the keyword property is not on a file. The auto-properties can only be set for a client. That means you have to make sure each of your developers have this set. Every time they get a new computer, you'll have to verify it again.
Nor, does it guarantee that the property is on the file. Older files in the repository won't have it magically added even if they're edited. (Auto-properties only added when the file is added to the repository). There's nothing that prevents the developer from removing it either. Or, editing their auto-properties in their setup.
You have to use a pre-commit trigger to guarantee that the svn:keywords property is on each and every file where it's required and that it is set correctly. The pre-commit hook will simply refuse to commit a transaction where this property isn't set. The developer will be forced to add the property. After some griping, developers will setup their Subversion client to use auto-properties and maintain it themselves.
I just happen to have a pre-commit trigger that can enforce this. The trigger is written in Perl, but requires nothing but standard modules, so it's easy to setup. You can configure it to say which files require the keyword and what it should be set to. If a file is being committed and it doesn't have the svn:keywords attribute set to the correct value, the commit will fail, and the error message will explain why the commit failed and what the developer needs to do.