Hook to allow/prevent commits based on file type and folder?
Hi folks, I need to prevent users adding and commiting files of a specific file type in our development structure, but allow Add and Commit if that file type is on an Acceptance branch. For example: All files with extension .foo can not be Added/Committed while their repository path contains the folder name /DEV/ , but can be added and committed if the path contains /ACC/ (files of type .foo can be added when on the ACCeptance branch but not on the DEVelopment branch). Similarly, I want to restrict the addition of different file type (lets call it .abc) to the /DEV/ path only, and NOT allow commit of any changes after these files move over to /ACC/ using SVN. It would be useful to set the svn:needs-lock on these file types once they move over to the /ACC/ branch, but that may be another discussion. Does anyone have experience or scripts they can share that can get me started on this part of my pre-commit script? Cheers! Tim
Really? No one has had the need to restrict the commit of file types based on location? Ok. Lets say you wanted to do it. How about a couple of clues where to start? Output from svnlook? Throw me a bone, folks! :) Tim
NovasTaylorReally? No one has had the need to restrict the commit of file types based on location? Ok. Lets say you wanted to do it. How about a couple of clues where to start? Output from svnlook? Throw me a bone, folks! :) TimYou can look at Path-Based Authorization: http://svnbook.red-bean.com/en/1.5/svn.serverconfig.httpd.html#svn.serverconfig.httpd.authz.perdir The above link is based on directory names rather than files. For more granular control, you might want to try pre-commit hooks.
1-3 of 3
Reply to this discussion
You cannot edit posts or make replies: You should be logged in before you can post.