Author: kameshj
Date: Fri May 13 16:04:26 2011
New Revision: 1102803

URL: http://svn.apache.org/viewvc?rev=1102803&view=rev
Log:
Provide a meaningful error for write through proxy setup.

* subversion/mod_dav_svn/reports/update.c
  (dav_svn__update_report): Detect the write through proxy set up
   and provide a meaningful error.

Patch by: cmpilato
Reviewed by: kameshj

Modified:
    subversion/trunk/subversion/mod_dav_svn/reports/update.c

Modified: subversion/trunk/subversion/mod_dav_svn/reports/update.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/reports/update.c?rev=1102803&r1=1102802&r2=1102803&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/reports/update.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/reports/update.c Fri May 13 
16:04:26 2011
@@ -1176,18 +1176,24 @@ dav_svn__update_report(const dav_resourc
                     saw_rev = TRUE;
                     if (revnum_is_head && rev > revnum)
                       {
-                        /* ### This error could be improved with more details
-                           ### if we know  that this repository is a slave
-                           ### repository in a master-slave setup. */
-                        return dav_svn__new_error_tag(
-                                            resource->pool,
-                                            HTTP_INTERNAL_SERVER_ERROR,
-                                            0,
-                                            "A reported revision is higher"
-                                            " than the current HEAD revision"
-                                            " of the repository.",
-                                            SVN_DAV_ERROR_NAMESPACE,
-                                            SVN_DAV_ERROR_TAG);
+                        if (dav_svn__get_master_uri(resource->info->r))
+                          return dav_svn__new_error_tag(
+                                     resource->pool,
+                                     HTTP_INTERNAL_SERVER_ERROR, 0,
+                                     "A reported revision is higher than the "
+                                     "current repository HEAD revision.  "
+                                     "Perhaps the repository is out of date "
+                                     "with respect to the master repository?",
+                                     SVN_DAV_ERROR_NAMESPACE,
+                                     SVN_DAV_ERROR_TAG);
+                        else
+                          return dav_svn__new_error_tag(
+                                     resource->pool,
+                                     HTTP_INTERNAL_SERVER_ERROR, 0,
+                                     "A reported revision is higher than the "
+                                     "current repository HEAD revision.",
+                                     SVN_DAV_ERROR_NAMESPACE,
+                                     SVN_DAV_ERROR_TAG);
                       }
                   }
                 else if (strcmp(this_attr->name, "depth") == 0)


Reply via email to