Reputation: 5459
Is there a way in subversion to specify that a specific path is an alias for a different path, with the ability to update that alias as conditions change? Can I lock paths to prevent changes in them?
I'm working on a repository structure and what I'd like to do is have the following paths:
The goal is to keep trunk moving to keep up with where most developers are working. After we release a couple times and 1.2 goes live, the structure would be:
I know I could do this on my own machine, but mandating this in source control gives everyone a common set of verbiage to work with.
Upvotes: 8
Views: 3965
Reputation: 24577
To the best of my knowledge, you can achieve something similar to this using the svn:externals property to make a folder act as an alias to another. If you never have to commit in two versions/branches at once, it should work.
Upvotes: 6
Reputation: 34408
There's no support for aliases, sorry. It is quick and easy to copy whole trees, however. You can either not create version/1.2 etc. and then just copy trunk to version/1.2 when the time comes, or instead just work in version/1.2. Alternatively you could manage both but use a process to copy commits between the two, e.g. once they had passed all the tests on your continuous integration server it copies commits from trunk to 1.2.
Locking: you can write a server-side commit hook to prevent commits to specific paths and add your paths there to lock them. There's no built-in support in either the server or default client however. Some clients e.g. TortoiseSVN will treat paths containing 'tags' as should-be-locked and warn you if you're going to commit to them, but that's purely client-side and client-specific.
Upvotes: 2