Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subversion: Write protection for tagged directories

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?

like image 583
Alexander Avatar asked May 21 '10 12:05

Alexander


People also ask

How to do svn tag?

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.

How to create tags in svn using TortoiseSVN?

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.

How to create a branch from a tag in svn?

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.

How do I checkout tag in svn?

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.


2 Answers

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

like image 50
Tim Henigan Avatar answered Sep 21 '22 05:09

Tim Henigan


You can give read only permission on the tag directories using path-based authorization.

like image 45
Davide Gualano Avatar answered Sep 23 '22 05:09

Davide Gualano