BigBobby
BigBobby

Reputation: 453

SVN tagging outside tags folder

I'm trying to expand use of SVN outside the software group at my company. While this may seem trivial, they would prefer to have the repo arranged like this:

Basically all this does is eliminate the /tags subdirectory, and they never expect to have branches. Is there any way to do this in SVN, but still get the warnings when someone is about to check in over a tag?

I realize this is a trivial change to how SVN is typically used, but I figured it's worth looking into if it is possible.

Upvotes: 0

Views: 33

Answers (1)

Lazy Badger
Lazy Badger

Reputation: 97395

You can write pre-commit hook, in which with svnlook dirs-changed you can test all targets of commit (and block commit if it's in "protected" trees).

If you'll enumerate all "tags" in destination-checks (instead of blocking all commits outside /project), it will effectively block all commits to existing tags, but allow to create new with server-side svn copy. And you'll have only one small drawback of such solution - after creating new node of "tags"-family you have to fix your hook and expand taglist in it

Upvotes: 1

Related Questions