There have been a few answers that can work:
- Create a pre-commit hook script that reject the commit when a specific property is being added. You can then add this property to files in the working copy to prevent commits.
- TortoiseSVN will exclude files in the special changelist “ignore-on-commit”. However, this is not honored by the SVN command-line client.
CoverosGene suggested that the default commands such as svn commit
operate on a default changelist, such that you can exclude a file if you assign it to another changelist, but I can’t find any reference of that in the documentation, and in my testing this does not work.
Since there is no good solution for the SVN command-line client, I’ve opened an enhancement request here. The request suggests that the command-line client could also honor the “ignore-on-commit” changelist.
Update: This is now issue 2858 and there is a feature outline to handle it with an svn:hold
property.