Hi Anton,

On 9/28/16 8:46 AM, Anton Shepelev wrote:
Hello, all

We  are migrating to SVN from the dreaded SourceSafe
and should like to retain, if only at the start, the
exclusive  check-out  process,  with  the  following
*atomic* operations which  should  be  performed  as
easily as possible:

   1.  lock and update,
       lest  one  might accidentally start editing an
       old version of some file.
Subversion supports locks. However, it sounds like they do not work the way you want them to.

Subversion's locks do not prevent anyone from editing files. They merely slow other people, besides the owner of the lock, from committing changes.

"svn update" is your friend. Just encourage users to do updates before they start editing.

Also, the lock-before-edit approach doesn't actually solve the problem of making sure users have the latest. My recollection from using VSS was that integration problems showed up more frequently, not less. I think this was from the illusion that I have the latest version of the file I want to edit (since I got the lock), so my files are probably all going to be consistent. In practice, other developers change APIs, and I only discover that by keeping current on the latest code changes.

The Subversion approach quickly trains users to get the latest changes frequently.
   2.  commit and unlock.
Commits and locks are independent.

Can SVN be configured to have such  operations,  and
how?
I suspect you could tie yourself up into knots trying to write hook scripts that accomplish some of what you want, but by the time you get them working just the way you think you want them, you'll discover that you probably don't want them that way.

Eric.

We plan to use it mainly from the AnkhSVN plugin for
Visual Studio, but  I  think  the  question  belongs
here.


Reply via email to