[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

hook scripts: only commit if locked

From: Noam Tamim <noamtm_at_gmail.com>
Date: 2005-11-01 21:51:26 CET

Hi,

Our svn repository contains files (VS.Net project files) that must not be
edited by more than one user simultaneously (merging them makes no sense).
For these files, we want to work in a SourceSafe-like mode.

1. What's the correct way to do it? I'm sure we're not the first svn users
to come across this problem, so possibly there's a configuration item for
that.

2. As an attempt to solve this problem, we added the needs-lock property to
these files - so that they are read-only until a user requests the lock. The
problem is that if a user manually resets the read-only flag on the file, he
can change it and then commit - without first acquiring a lock. I read that
we can use the hook scripts for that - but the start-commit and pre-commit
hooks don't pass the file and its state to the script, so it can't verify
the commit. Am I missing something?

3. It's also possible that we totally miss the purpose and usage of locks;
we've been using SourceSafe so far, so please understand (and explain) :-)

Thanks,
Noam.
Received on Tue Nov 1 21:53:41 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.