Activities

May 2012
M T W T F S S
« Apr   Jun »
 123456
78910111213
14151617181920
21222324252627
28293031  

Subversion : Removing uncommitted transactions

One of the projects badly affected by the following errors and user requested us to re-load the new repository with latest code they have. After spending some time in net, it’s is identified that there are lots of uncommitted transaction logs are occurred in svn repository. This cause svn stops to execute any further commits after that. A quick fix for this problem is to delete all the broken commit from the repository.

This is the error users getting on eclipse editor while committing changes

org.apache.subversion.javahl.ClientException: RA layer request failed
svn: Commit failed (details follow):
svn: Server sent unexpected return value (500 Internal Server Error) in response to PUT request for '/svn/intersight/!svn/wrk/dfbb33ea-17f5-9347-a3f2-3c597d8a7c9a/trunk/WebContent/WEB-INF/lib/jpa-api-2.0-cr-1.jar'

org.apache.subversion.javahl.ClientException: RA layer request failed
svn: Commit failed (details follow):

I found many broken links are recorded in SVN repository.

[root@server SVNRepositories]# svnadmin lstxns  svnrepo
23-1
14-1
42-1
43-1
34-1
25-1
42-2
44-1
34-2
42-3
17-1
26-1
43-2
26-2
37-1
26-3

I did restart Apache as I use svn deployment over the mov_dav and it did not helpful.
Removing all the queued/broken commits

Use the following method,

Eg: svnadmin rmtxns /path/to/svn `svnadmin lstxns /path/to/svn`

[root@SVNRepositories]# svnadmin rmtxns myrepo `svnadmin lstxns myrepo`  
Transaction '23-1' removed.
Transaction '14-1' removed.
Transaction '42-1' removed.
Transaction '43-1' removed.
Transaction '34-1' removed.

That’s it.

To verify

# svnadmin lstxns myrepo shows empty list 🙂

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>