Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Locking a SubVersion branch in the days before a release

In the days before a release we'd like to be able to prevent developers from committing files to the SubVersion branch, unless a team leader has reviewed and approved the changes (in which case they would make a temporary change to allow this).

Previously we used ClearCase, in which this was relatively easy to do.

Since the svn:lock command only works on a per-file basis, we are uncertain if we can emulate this behaviour in SubVersion.

What do you do?

like image 736
Richard Ev Avatar asked Jul 29 '10 16:07

Richard Ev


2 Answers

Laterally thinking - why not just create a branch at the point at which you want to 'lock' it and only check out that revision number in your build/release process.

Then developers can still check-in to the trunk (or whatever other branch they're working on) and if a team leader approves changes for the release then they can be merged into the branch. Granted this doesn't actually 'lock' the release branch but at least you can easily track/undo changes if necessary and it doesn't prevent people working. The developers source will still be pointing to the branch/trunk they were working on rather than the new release branch.

Creating branches is very cheap and easy in SVN (I believe).

like image 178
shunty Avatar answered Sep 19 '22 02:09

shunty


You can have a look at GUI svn clients which usually have richer interface/functionality set than a command line one. For example, I'm using TortoiseSVN which has options Get Lock/Release Lock applicable for locking all files in the selected folder recursively. BTW, it also has convenient option of making tag/branch and switching to it as one action.

like image 39
pmod Avatar answered Sep 20 '22 02:09

pmod