From SubversionWiki
Jump to: navigation, search
Different versions of binary files cannot be merged. Therefore versioning of binary files should follow the lock-modify-unlock model[1]. This setup uses the following three measures
forces users to use property svn:needs-lock on newly added binary files. Denies commits when the property is not available
sets the svn:needs-lock property on all already existing binary files in repositories
configures users to automatically set property svn:needs-lock on newly added binary files
1) - create a pre-commit.cmd script in the repository\hooks directory. This script verifies that property svn:needs-lock is set on binary files and denies the commit if the property is not available (Windows only):
2) Recursively set svn:needs-lock property on binaries
If you need to apply svn:needs-lock on already existing binaries in a repository, do the following on a client (not on the svn server): - checkout a repository - add to following line to a cmd script (Windows only):
- run the script
3) Configure users to automatically use svn:needs-lock property on new binary files
New binary files should have the svn:needs-lock property set, this is verified by the script of step 1. This can be achieved automatically if users configure their svn client config file.
- under windows the SVN config file is "C:\Documents and Settings\[USER_NAME]\Application Data\Subversion\config"
Replace or merge the [miscellany] and [auto-props] sections in the svn config file with the following: