You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2010/01/23 20:48:52 UTC
svn commit: r902467 - in /subversion/trunk/subversion:
libsvn_ra_neon/mergeinfo.c libsvn_ra_serf/mergeinfo.c
Author: pburba
Date: Sat Jan 23 19:48:52 2010
New Revision: 902467
URL: http://svn.apache.org/viewvc?rev=902467&view=rev
Log:
Fix broken svn_ra_get_mergeinfo API promise in serf and neon implementations.
This fixes mergeinfo_tests.py 8 'svn mergeinfo on pegged working copy
target' over ra_neon and ra_serf. The ra_local and ra_svn implementations
already DTRT.
* subversion/libsvn_ra_neon/mergeinfo.c
(svn_ra_neon__get_mergeinfo): Return a null mergeinfo catalog if there is
no mergeinfo, as per svn_ra_get_mergeinfo's API.
* subversion/libsvn_ra_serf/mergeinfo.c
(svn_ra_serf__get_mergeinfo): Ditto.
Modified:
subversion/trunk/subversion/libsvn_ra_neon/mergeinfo.c
subversion/trunk/subversion/libsvn_ra_serf/mergeinfo.c
Modified: subversion/trunk/subversion/libsvn_ra_neon/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/mergeinfo.c?rev=902467&r1=902466&r2=902467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_neon/mergeinfo.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/mergeinfo.c Sat Jan 23 19:48:52 2010
@@ -176,6 +176,8 @@
static const char minfo_report_tail[] =
"</S:" SVN_DAV__MERGEINFO_REPORT ">" DEBUG_CR;
+ *catalog = NULL;
+
/* Construct the request body. */
svn_stringbuf_appendcstr(request_body, minfo_report_head);
svn_stringbuf_appendcstr(request_body,
@@ -242,7 +244,7 @@
FALSE,
pool));
- if (mb.err == SVN_NO_ERROR)
+ if (mb.err == SVN_NO_ERROR && apr_hash_count(mb.catalog))
*catalog = mb.catalog;
return mb.err;
Modified: subversion/trunk/subversion/libsvn_ra_serf/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/mergeinfo.c?rev=902467&r1=902466&r2=902467&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/mergeinfo.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/mergeinfo.c Sat Jan 23 19:48:52 2010
@@ -243,6 +243,8 @@
const char *relative_url, *basecoll_url;
const char *path;
+ *catalog = NULL;
+
SVN_ERR(svn_ra_serf__get_baseline_info(&basecoll_url, &relative_url, session,
NULL, NULL, revision, NULL, pool));
@@ -296,7 +298,7 @@
SVN_ERR(err);
- if (mergeinfo_ctx->done)
+ if (mergeinfo_ctx->done && apr_hash_count(mergeinfo_ctx->result_catalog))
*catalog = mergeinfo_ctx->result_catalog;
return SVN_NO_ERROR;