I have a Collabnet Subversion Edge v3.3.1 installation on Windows. I already have basic access restriction enabled but this does not give me the flexibility to do the following: 1. Abandon file/folder delete by users 2. Use of wild cards for specifying file level permissions in a repository
Hence, I googled and found svnperms.py to suit my requirement. I followed the instructions on the internet and configured the svnperms.py for access restrictions.
My pre-commit hook looks as below:
set REPOS=%1
set TXN=%2
REM "C:\csvn\Python25\python.exe" "C:\csvn\data\repositories\repos\hooks\svnperms.py" -r "%repos%" -t "%txn%" - f "C:\csvn\data\repositories\repos\hooks\svnperms.conf"
"C:\csvn\Python25\python.exe" "C:\csvn\data\repositories\repos\hooks\svnperms.py" - f "C:\csvn\data\repositories\repos\hooks\svnperms.conf" -r "%REPOS%" -t "%TXN%"||exit 1;
exit 0;
My configuration file looks like
[groups]
group1 = sowmya.dass
group2 = m.b
[repos]
a/.* = @group1(update)
a/.* = @group2(delete)
I tried testing this by making user m.b delete a file under folder a in the repository. Since the user has access he should be able to do it but then i get the below error when he tries to commit :
Command: Commit
Deleting: C:\m_ws_edge\a\pom.xml
Error: Commit failed (details follow):
Error: Commit blocked by pre-commit hook (exit code 1) with output:
Error: svnlook author C:\csvn\data\repositories\repos -t 5-c
Error: '{' is not recognized as an internal or external command,
Error: operable program or batch file.error: command failed: svnlook author
Error: C:\csvn\data\repositories\repos -t 5-c
Error: '{' is not recognized as an internal or external command,
Error: operable program or batch file.
Completed!:
The same error comes up when any user tries to do any operation irrespective of whether a user has access granted or not.
I looked at an earlier post at How to control changes to tags in SVN server on Windows where in a similar issue was discussed. But the solution does not suit my requirement. And it also mentions that svnperms.py does not work on windows due to the underlying svnlook commands which only work on unix. I also happened to see other posts on the internet which mentioned similar issues but I could not find any solution to getting svnperms.py work on windows.
Can anybody help me with : 1. Fix the above error and to get svnperms.py work on windows or/and 2. Alternative solution to suit my above mentioned requirements of being able to abandon user delete on files/folders and being able to use wildcards in file based access restrictions.
Thanks !
Regards
Sowmya Dass