You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2015/03/09 17:48:06 UTC

svn commit: r1665300 - in /subversion/trunk/subversion: include/svn_ra.h libsvn_ra/ra_loader.c

Author: rhuijben
Date: Mon Mar  9 16:48:06 2015
New Revision: 1665300

URL: http://svn.apache.org/r1665300
Log:
Document the revision argument of svn_ra_get_locations() more
precisely, as both mod_dav and ra_svn forbid SVN_INVALID_REVNUM
in their existing implementations.

* subversion/include/svn_ra.h
  (svn_ra_get_locations): Update docs.

* subversion/libsvn_ra/ra_loader.c
  (svn_ra_get_locations): Add assertion.

Modified:
    subversion/trunk/subversion/include/svn_ra.h
    subversion/trunk/subversion/libsvn_ra/ra_loader.c

Modified: subversion/trunk/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_ra.h?rev=1665300&r1=1665299&r2=1665300&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_ra.h (original)
+++ subversion/trunk/subversion/include/svn_ra.h Mon Mar  9 16:48:06 2015
@@ -1718,9 +1718,10 @@ svn_ra_get_repos_root(svn_ra_session_t *
 /**
  * Set @a *locations to the locations (at the repository revisions
  * @a location_revisions) of the file identified by @a path in
- * @a peg_revision.  @a path is relative to the URL to which
- * @a session was opened.  @a location_revisions is an array of
- * @c svn_revnum_t's.  @a *locations will be a mapping from the revisions to
+ * @a peg_revision (passing @c SVN_INVALID_REVNUM is an error).
+ * @a path is relative to the URL to which @a session was opened.
+ * @a location_revisions is an array of @c svn_revnum_t's.
+ * @a *locations will be a mapping from the revisions to
  * their appropriate absolute paths.  If the file doesn't exist in a
  * location_revision, that revision will be ignored.
  *

Modified: subversion/trunk/subversion/libsvn_ra/ra_loader.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra/ra_loader.c?rev=1665300&r1=1665299&r2=1665300&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/trunk/subversion/libsvn_ra/ra_loader.c Mon Mar  9 16:48:06 2015
@@ -953,6 +953,7 @@ svn_error_t *svn_ra_get_locations(svn_ra
 {
   svn_error_t *err;
 
+  SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(peg_revision));
   SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
   err = session->vtable->get_locations(session, locations, path,
                                        peg_revision, location_revisions, pool);