I finally got my group to switch from SourceSafe to Subversion. Unfortunately, my manager still wants to use exclusive locks on every single file. So I set the svn:needs-lock
You can discover locks from a local checkout using svn status --show-updates
which will put an O
before all files which are locked on the server.
e.g.
$ svn status --show-updates
O 279532 LockedFile
? UncommittedFile
M 279532 ModifiedFile
see the svnbook for more details
To see what locks you and others hold, you can use TortoiseSVN → Check for Modifications.... Locally held lock tokens show up immediately. To check for locks held by others (and to see if any of your locks are broken or stolen) you need to click on Check Repository.
This might not be the answer you're looking for, but you should try to convince the manager that locks are actually not the best development practice. There's lots out there that's been written on this subject, so I won't repeat it all here.
When you go from a locking environment to one with no enforced checkout locks, at first you think it will lead to chaos, but it really doesn't. SVN is good at merging changes when two people are working on the same file, and even if you end up with conflicts, it's not so bad to fix them.
Much better than waiting around for the guy who went to lunch with a critical file checked out, or worse yet, went on vacation.
What you're looking for is the svnadmin lslocks command.
I have this set up at work because we keep some Word documents in our Subversion repository (with svn:needs-lock
). I have a cron job set up that every day, checks the list of locks and emails a report of all locks older than 7 days to the whole team. That way we can tell who has been slacking and sitting on a locked copy of a document for a long time.