svnsharpsvn

Removing zombie locks in Subversion


I'm trying to find a way to remove zombie locks using the Subversion command line tools. The eventual goal is to do this from a hook script, but I haven't been able to work out the command line to use when you only have a physical repository path. (Using svnadmin rmlocks only seems to work for locks which exist in the HEAD revision.)

Ideally, I'd like to do this via the post-commit hook script using the command line tools. (I'm aware of the python script for this purpose, but we'd prefer not to install python on that server for this single use.) We're a .NET shop, so creating a tool with the SharpSVN library is also a possibility, but the only unlock capability there appears to be in the SVNClient class.

So it's really two questions: Is there a way to do this with the command line tools? If not, is there a way to do it from SharpSVN? (Or perhaps another library?)

== Update Dec 3, 2012 ==

I've had to revisit this problem recently and discovered this question is still drawing traffic. The python script mentioned in the original question and Don's answer has since moved to: http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/remove-zombie-locks.py (I assume that's what most folks are looking for.)

Ironically, even though the repository has moved to Linux, we're using the C solution.


Solution

  • It looks like the answer is "You can't get there from here."

    So rewriting the python script in C using the Subversion API library.