i am using subversion as RCS. Always when a new version of my project is finised i create a tag of it (copy of the trunk). Does anybody know how i can protect this tagged directory from being accidentally modified?
At the moment as a workaround i lock all files. But this sill means that the user with the lock can edit the files.
Is there any better solution?
Select the folder in your working copy which you want to copy to a branch or tag, then select the command TortoiseSVN → Branch/Tag.... If you can't remember the naming convention you used last time, click the button on the right to open the repository browser so you can view the existing repository structure.
To get started, right click on your working copy and select the 'Branch/Tag option from the TortoiseSVN' menu. Add an appropriate log message in the 'Log message' box. Select which revision you wish to tag. This is usually the HEAD revision, but you can specify another revision, if required.
Alternatively, select the source folder in the SVN Repositories tool window and choose the Branch or Tag command from the context menu. In the Create Branch or Tag dialog that opens, in the Copy From section, specify the source folder that will be copied to a branch or a tag.
As such, to checkout a tag, you check out with your URL referencing the directory. To commit back that tag, you do a normal commit. To commit back to a different tag, you svn copy the files into the new "correct" tag directory, which you might have to mkdir ...; svn add (dir) prior to the svn copy.
You can use a pre-commit hook to prevent users from writing to a tags
directory after it has been created.
See this related SO question for examples:
SVN pre-commit hook for avoiding changes to tags subdirectories
You can give read only permission on the tag directories using path-based authorization.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With