Functional and admin
As of today, there is already a SVN "immutable tags" implementation that prevent tags modifications with repository shaped like:
.
|-- moduleA
| |-- trunk
| | `-- files and stuff
| `-- tags
| `-- ... tag stuff
`-- moduleB
|-- trunk
| `-- files and stuff
`-- tags
`-- ... tag stuff
This story is about adding the same feature when the repository looks like:
.
|-- trunk
| |-- moduleA
| | `-- files and stuff
| |-- moduleB
| `-- ... other modules
`-- tags
`-- tag stuff
As a svn admin, I will have the possibility to select between:
- No SVN "immutable tags" (default)
- SVN tags immutable when having modules at root (previous implementation)
- SVN tags immutable when trunk/tags/branches at root (new)
Note: all projects that already use the "immutable tags" feature, will be converted to option 2 by default
SVN operations
Translated in svn terms, it means that, for any operations that have /tags as a target (/tags must be at root of repository):
- 'A' (addition) operations should be allowed as long as the target directory doesn't exist
- 'U' (update), '_U' (update of properties), 'UU' (update of properties + content) or 'D' (delete) operations should be forbidden
The changes with current implementation are:
- As of today, all 'A' operations are allowed
- As of today, Update of properties are not taken into account
'A', 'U', ... letters are from official SVN documentation: http://svnbook.red-bean.com/en/1.7/svn.ref.svnlook.c.changed.html
Therefore, given the following tree:
/trunk/moduleA/bla
/trunk/moduleB/blo
/trunk/tags/
- (OK) svn mkdir ^/trunk/moduleA
- (OK) svn cp ^/trunk/moduleA ^/tags/moduleA/v1
- (ERR) svn cp ^/trunk/moduleA ^tags/moduleA/v1
- (OK) svn cp ^/trunk/moduleA ^/tags/moduleA/v2
- (OK) svn mkdir ^/tags/moduleB/stuff
- (OK) svn cp ^/trunk/moduleA ^/tags/moduleB/stuff/toto
- (ERR) svn rm ^/trunk/moduleB
- (ERR) svn proposet svn:ignore ... ^/tags/moduleA/v1
- (OK) svn mkdir ^/moduleA/tags/
- (OK) svn cp ^/trunk/moduleA ^/moduleA/v1
- (OK) svn cp ^/trunk/moduleA ^/moduleA/v1
- (OK) svn cp ^/trunk ^/tags/v1
- (ERR) svn cp ^/trunk ^/tags/v1
- (OK) svn cp ^/trunk/moduleA ^/tags/v2
- (OK) svn cp ^/trunk ^/tags/moduleA/v3
I highlighted the edge cases, were the behaviour is technically correct but result might be counterintuitive.
SVN Operations corrections
As of today, some operations are allowed inside tags whereas it should fail, those use cases should be fixed as well:
- (ERR) svn co ^/submodule/tags/V1 && touch toto && svn add toto && svn commit -m "add in tag"
- (ERR) svn co ^/tags/V1 && touch toto && svn add toto && svn commit -m "add in tag"