My development server is accessed by several OSX users, and their OS tends to leave lots of unnecessary files around the place, all starting with dot underscore (“._“). I know OSX can be told not to create these on network drives, but they still sneak in. I’d like SVN to ignore anything starting with “._“, but I can’t seem to get it to work, even though it looks like it should be simple. I’ve added “._*” to the SVN global ignore pattern, but SVN is still trying to add and commit these files. Can anyone tell me what I’m doing wrong? My full SVN ignore pattern is:
global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo *.rej *~ #*# .#* .*.swp .DS_Store Thumbs.db ._* *.bak *.tmp nbproject
I don’t know if it makes any difference, but I’m trying to set this on both Ubuntu and Ubuntu server by editing the /etc/subversion/config file.
I have a pre-commit hook that might fit the bill. This hook allows you to completely ban the use of certain file names based upon a regular expression. You can ban any file that starts with “._” and if someone tries to add one, they won’t be able to commit it.
After a few rejected commits due to having “._” files, developers will update their
global-ignoresto include those files.You can’t set
global-ignoresfor all of your users, but this pre-commit hook will encourage your users to set it on their own.It works on the same principle of how electric sockets discourage users from sticking a fork into them. After the third or fourth time, even the most stubborn developers learn that it’s not a good idea.