Author: hwright
Date: Thu Jul 21 13:22:54 2011
New Revision: 1149170
URL: http://svn.apache.org/viewvc?rev=1149170&view=rev
Log:
Reintegrate the 1.7.x-issue3888 branch:
* 1.7.x-issue3888 branch
Fix issue 3888 for 1.7.x
Justification:
For very large checkouts/updates/switches, ra_serf may consume
unbounded memory. That is not good.
Votes:
+1: gstein, jerenkrantz, lgo
Modified:
subversion/branches/1.7.x/ (props changed)
subversion/branches/1.7.x/subversion/libsvn_ra_serf/serf.c
Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul 21 13:22:54 2011
@@ -54,4 +54,4 @@
/subversion/branches/tree-conflicts:868291-873154
/subversion/branches/tree-conflicts-notify:873926-874008
/subversion/branches/uris-as-urls:1060426-1064427
-/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1148071,1148374,1148566,1148588,1148853,1148936
+/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1148071,1148131,1148374,1148566,1148588,1148853,1148936
Modified: subversion/branches/1.7.x/subversion/libsvn_ra_serf/serf.c
URL:
http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_ra_serf/serf.c?rev=1149170&r1=1149169&r2=1149170&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_ra_serf/serf.c Thu Jul 21
13:22:54 2011
@@ -1087,6 +1087,9 @@ svn_ra_serf__init(const svn_version_t *l
{ "svn_delta", svn_delta_version },
{ NULL, NULL }
};
+ int serf_major;
+ int serf_minor;
+ int serf_patch;
SVN_ERR(svn_ver_check_list(ra_serf_version(), checklist));
@@ -1094,12 +1097,27 @@ svn_ra_serf__init(const svn_version_t *l
VTABLE parameter. The RA loader does a more exhaustive check. */
if (loader_version->major != SVN_VER_MAJOR)
{
- return svn_error_createf
- (SVN_ERR_VERSION_MISMATCH, NULL,
+ return svn_error_createf(
+ SVN_ERR_VERSION_MISMATCH, NULL,
_("Unsupported RA loader version (%d) for ra_serf"),
loader_version->major);
}
+ /* Make sure that we have loaded a compatible library: the MAJOR must
+ match, and the minor must be at *least* what we compiled against.
+ The patch level is simply ignored. */
+ serf_lib_version(&serf_major, &serf_minor, &serf_patch);
+ if (serf_major != SERF_MAJOR_VERSION
+ || serf_minor < SERF_MINOR_VERSION)
+ {
+ return svn_error_createf(
+ SVN_ERR_VERSION_MISMATCH, NULL,
+ _("ra_serf was compiled for serf %d.%d.%d but loaded "
+ "an incompatible %d.%d.%d library"),
+ SERF_MAJOR_VERSION, SERF_MINOR_VERSION, SERF_PATCH_VERSION,
+ serf_major, serf_minor, serf_patch);
+ }
+
*vtable = &serf_vtable;
return SVN_NO_ERROR;