10.7.10

SVN 409 Conflict Error

 

If you follow this POST to establish a Subversion server over HTTPs using apache, you will probably have this error message when you try to commit some changes into your subversion server.

Why?

What is 409 Conflict?

http://tools.ietf.org/html/rfc3253

1.6 Method Preconditions and Postconditions

A "precondition" of a method describes the state of the server that
must be true for that method to be performed. A "postcondition" of a
method describes the state of the server that must be true after that
method has been completed. If a method precondition or postcondition
for a request is not satisfied, the response status of the request
MUST be either 403 (Forbidden) if the request should not be repeated
because it will always fail, or 409 (Conflict) if it is expected that
the user might be able to resolve the conflict and resubmit the
request.
In order to allow better client handling of 403 and 409 responses, a
distinct XML element type is associated with each method precondition
and postcondition of a request. When a particular precondition is
not satisfied or a particular postcondition cannot be achieved, the
appropriate XML element MUST be returned as the child of a top-level
DAV:error element in the response body, unless otherwise negotiated
by the request. In a 207 Multi-Status response, the DAV:error
element would appear in the appropriate DAV:responsedescription
element.

Somewhere Out There?


Yes, many people encounter this problem. Please Google them by the keywords. You might probably here by googled, right?


A Useful Link


http://stackoverflow.com/questions/2547400/how-do-you-fix-an-svn-409-conflict-error


Here is some of the content from the link:



Update (Solution)

I just wanted to update this with the actual solution in case anyone else is having the same problem with the completely unhelpful error messages. The problem was with the apr and apr-util parts (as scherand suggested). I was building a copy of both using the subversion dependencies package. OS X 10.6 also has it's own version. Both versions were 1.3.8. Apparently though, I needed to use the versions that the default apache install was using.

So, I deleted the apr and apr-util folders from my subversion build, to make sure that I wasn't building my own copy of these again. I built svn from source again, this time using the following configuration:

./configure --with-apr=/usr/bin/ --with-apr-util=/usr/bin/ --with-ssl

After building again, I restarted apache, and created a new svn repo. I was able to check it out, make changes, and commit without any issues. I then tried my old repos and those worked as well.

Thanks everyone for the help!


My Solution


1. Download the most update Apache HTTP server source code. Currently I download 2.2.15, which is the most update one


2. Configure the HTTP server with a command line similar to this:


./configure  --prefix=/usr/local/svn2 --enable-dav --enable-so --enable-ssl --with-included-apr

3. make && sudo make install

4. Configure the Subversion server with a command line similar to this:

./configure --prefix=/usr/local/svn2 --with-apxs=/usr/local/svn2/bin/apxs --with-ssl --with-apr=/usr/local/svn2/bin/ --with-apr-util=/usr/local/svn2/bin

5. make && sudo make install && make swig-py && sudo make install-swig-py


6. Configure HTTP server as described in the previous POST.


Problem sovled.

No comments: