Sunday, December 12, 2010

Fixing SVN commit failure - Cannot write to the prototype revision file of transaction

There are times that svn misbehaves and when the going gets rough you have to have the initial understanding on how to fix the problem.

Example:

Transmitting file data ....svn: Commit failed (details follow):
svn: Cannot write to the prototype revision file of transaction '4615-1' because a previous representation is currently being written by this process


1. What you could is try to re-load/re-start apache - usually it refreshes the entire tree for any locks to remove the handle.

2. Use svnadmin to fix the problem - in many case if the first method doesnt fix it you can use the svn admin tool to fix it.  

3. You may want to get a fresh copy from your main branch.  This is due in time since your local copy may no longer be as consistent with that of found on the server.  Again, svnadmin plays a critical role in fixing problems related to this.


svnadmin lstxns /path/to/repository

But most of the time "1" is sufficient.

2 comments:

  1. thx for sharing this one - you saved my day! - approach 1 worked right away...

    ReplyDelete
  2. Mine worked only with the following:

    svnadmin upgrade /path/to/repository

    and finally:

    svnadmin pack /path/to/repository

    ReplyDelete