You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2013/06/21 06:00:36 UTC

svn commit: r1495278 - in /subversion/branches/1.8.x: ./ STATUS subversion/include/private/svn_ra_private.h subversion/libsvn_ra/ra_loader.c subversion/libsvn_ra/util.c

Author: svn-role
Date: Fri Jun 21 04:00:36 2013
New Revision: 1495278

URL: http://svn.apache.org/r1495278
Log:
Merge the r1492148 group from trunk:

 * r1492148, r1493720
   Don't try to use 'blame -r 5:1' against 1.7 servers.  Affects only users
   of the RA API, not users of the client API or svn.
   Justification:
     1.7 servers would silently do the wrong thing.
   Votes:
     +1: danielsh, rhuijben, stefan2

Modified:
    subversion/branches/1.8.x/   (props changed)
    subversion/branches/1.8.x/STATUS
    subversion/branches/1.8.x/subversion/include/private/svn_ra_private.h
    subversion/branches/1.8.x/subversion/libsvn_ra/ra_loader.c
    subversion/branches/1.8.x/subversion/libsvn_ra/util.c

Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1492148,1493720

Modified: subversion/branches/1.8.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1495278&r1=1495277&r2=1495278&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Fri Jun 21 04:00:36 2013
@@ -197,14 +197,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1492148, r1493720
-   Don't try to use 'blame -r 5:1' against 1.7 servers.  Affects only users
-   of the RA API, not users of the client API or svn.
-   Justification:
-     1.7 servers would silently do the wrong thing.
-   Votes:
-     +1: danielsh, rhuijben, stefan2
-
  * r1493475
    Improve 'svn merge' performance over WAN: Use already fetched 
    history-as-mergeinfo data to find youngest common ancestor in automatic 

Modified: subversion/branches/1.8.x/subversion/include/private/svn_ra_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/include/private/svn_ra_private.h?rev=1495278&r1=1495277&r2=1495278&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/include/private/svn_ra_private.h (original)
+++ subversion/branches/1.8.x/subversion/include/private/svn_ra_private.h Fri Jun 21 04:00:36 2013
@@ -39,15 +39,23 @@
 extern "C" {
 #endif /* __cplusplus */
 
-/* Return an error with code SVN_ERR_UNSUPPORTED_FEATURE, and an error
-   message referencing PATH_OR_URL, if the "server" pointed to by
-   RA_SESSION doesn't support Merge Tracking (e.g. is pre-1.5).
-   Perform temporary allocations in POOL. */
+/* Equivalent to svn_ra__assert_capable_server()
+   for SVN_RA_CAPABILITY_MERGEINFO. */
 svn_error_t *
 svn_ra__assert_mergeinfo_capable_server(svn_ra_session_t *ra_session,
                                         const char *path_or_url,
                                         apr_pool_t *pool);
 
+/* Return an error with code SVN_ERR_UNSUPPORTED_FEATURE, and an error
+   message referencing PATH_OR_URL, if the "server" pointed to by
+   RA_SESSION doesn't support CAPABILITY (an SVN_RA_CAPABILITY_* constant).
+   Perform temporary allocations in POOL. */
+svn_error_t *
+svn_ra__assert_capable_server(svn_ra_session_t *ra_session,
+                              const char *capability,
+                              const char *path_or_url,
+                              apr_pool_t *pool);
+
 
 /*** Operational Locks ***/
 

Modified: subversion/branches/1.8.x/subversion/libsvn_ra/ra_loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_ra/ra_loader.c?rev=1495278&r1=1495277&r2=1495278&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/branches/1.8.x/subversion/libsvn_ra/ra_loader.c Fri Jun 21 04:00:36 2013
@@ -1030,6 +1030,13 @@ svn_error_t *svn_ra_get_file_revs2(svn_r
   if (include_merged_revisions)
     SVN_ERR(svn_ra__assert_mergeinfo_capable_server(session, NULL, pool));
 
+  if (start > end)
+    SVN_ERR(
+     svn_ra__assert_capable_server(session,
+                                   SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE,
+                                   NULL,
+                                   pool));
+
   err = session->vtable->get_file_revs(session, path, start, end,
                                        include_merged_revisions,
                                        handler, handler_baton, pool);

Modified: subversion/branches/1.8.x/subversion/libsvn_ra/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_ra/util.c?rev=1495278&r1=1495277&r2=1495278&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_ra/util.c (original)
+++ subversion/branches/1.8.x/subversion/libsvn_ra/util.c Fri Jun 21 04:00:36 2013
@@ -69,6 +69,31 @@ svn_ra__assert_mergeinfo_capable_server(
   return SVN_NO_ERROR;
 }
 
+svn_error_t *
+svn_ra__assert_capable_server(svn_ra_session_t *ra_session,
+                              const char *capability,
+                              const char *path_or_url,
+                              apr_pool_t *pool)
+{
+  if (!strcmp(capability, SVN_RA_CAPABILITY_MERGEINFO))
+    return svn_ra__assert_mergeinfo_capable_server(ra_session, path_or_url,
+                                                   pool);
+
+  else
+    {
+      svn_boolean_t has;
+      SVN_ERR(svn_ra_has_capability(ra_session, &has, capability, pool));
+      if (! has)
+        return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
+                               _("The '%s' feature is not supported by '%s'"),
+                               capability,
+                               svn_path_is_url(path_or_url)
+                                  ? path_or_url
+                                  : svn_dirent_local_style(path_or_url, pool));
+    }
+  return SVN_NO_ERROR;
+}
+
 /* Does ERR mean "the current value of the revprop isn't equal to
    the *OLD_VALUE_P you gave me"?
  */