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

Teaching svnadmin to remove orphaned locks (Was: [CONTRIB] remove-zombie-locks.py, workaround for Issue #2507)

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2007-01-12 16:30:30 CET

dev-folk, this is in reference to the problem in issue #2507.

Nathan Kidd wrote:
> I'm not sure I'll have time, but would a patch for svnadmin adding the
> "clean whole repository" functionality likely be accepted?

What are you thinking in terms of an implementation? Having invested
about three minutes on it, here's what strikes me as do-able at the moment.

Add the following flags to 'svnadmin rmlocks':

  --recursive (-R): descend recursively
  --only-orphaned: only operate on locks for paths not in HEAD

Now, to be safe, the --only-orphaned could require an exclusive lock on
the repository (just like 'svnadmin recover' does). The default (just
like 'recover') would be to fail immediately if such a lock could not be
obtained. But we also add:

  --wait: wait instead of exit if the repository is in
                     use by another process

If we have a reason to do so later, we could also add --only-orphaned
and --wait to 'svnadmin lslocks'.

I spent more time typing that than thinking about it, so it could be
full of holes, but...

-- 
C. Michael Pilato <cmpilato@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on Fri Jan 12 16:30:45 2007

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

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