Reputation: 4279
Given a standard SVN server on a GNU/linux host which I don't have admin permissions to, and clients that are all using windows, mostly through TortoiseSVN, I need to make one repository read only for all clients.
I understand I may be able to do this with a pre-commit hook but I couldn't seem to get it working so idiot proof instructions of how to apply this to the repository would be appreciated. Also note that all clients are on windows not *nix.
If possible it would be nice if clients who had already checked out (and so may not have updated to retrieve the new hook) were also blocked from writing to the repository but it may be that this is not possible.
Upvotes: 0
Views: 701
Reputation: 97280
Block all and any commits from all clients
pre-commit.sh
in $ThisRepo/hooks
folder on SVN-server
#!/bin/bash
echo -e "Commits disabled." 1>&2
exit 1
Hook(s) are not part of repo, they exist outside it in physical folder on server-side
Upvotes: 1