Следующий скрипт Python показывает все блокировки и кому они принадлежат:
#!/usr/bin/python
# coding=UTF-8
# This tool shows who owns the locks in a subversion repository
import sys
import subprocess
if len(sys.argv) > 1:
p = subprocess.Popen(['svn', 'status', '-u', sys.argv[1]], bufsize=1, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
else:
p = subprocess.Popen(['svn', 'status', '-u'], bufsize=1, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(so, se) = p.communicate() # start command
lines = [x[21:].strip() for x in so.split('\n') if len(x) > 5 and x[5] == 'K']
for line in lines:
p = subprocess.Popen(['svn', 'info', line], bufsize=1, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(so, se) = p.communicate()
details = [x[12:].strip() for x in so.split('\n') if x.startswith('Lock Owner')][0]
print '[%s] (%s)' % (details, line)