svnworking-copy

svn update - force user to specify revision


I want to configure certain SVN working copy so that it is impossible to do svn update without specifying desired revision (-r). I want this because doing just svn update may update the working copy to a revision, that the user is unaware of. Example:

  1. At 12:40 user A checks the SVN log for latest revisions and checks that all the revisions (HEAD being revision 123) are ok.
  2. At 12:41 user B commits new, buggy, untested and generally ugly revision 124.
  3. At 12:42 user A does not know about revision 124 and does svn update, which is bad, because he beleives, that he updated to 123.

I know that the SVN client replies Updated to revision 124., but I also know that the users ignore important replies. This wouldn't happen, if user A was forced to specify -r 123.

Is there a way to achieve this in Subversion?


Solution

  • Your idea of a svn workflow has a big problem:

    B commits r124. A checks out r123.

    Now A cannot commit his changes (in the same branch) without updating to B's revision first. If he had changed any file touched by B, svn would tell him to update to HEAD first.

    Note that in case B knew his changes are "bad", he should commit them to another branch and not to trunk.