subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1411383 - in /subversion/branches/tree-read-api/subversion: include/private/svn_ra_private.h libsvn_ra/ra_trees.c
Date Mon, 19 Nov 2012 20:05:00 GMT
Author: julianfoad
Date: Mon Nov 19 20:04:58 2012
New Revision: 1411383

URL: http://svn.apache.org/viewvc?rev=1411383&view=rev
Log:
On the 'tree-read-api' branch:

* subversion/include/private/svn_ra_private.h,
  subversion/libsvn_ra/ra_trees.c
  (svn_ra__open_tree): Document and implement that SVN_INVALID_REVNUM means
    HEAD.

Modified:
    subversion/branches/tree-read-api/subversion/include/private/svn_ra_private.h
    subversion/branches/tree-read-api/subversion/libsvn_ra/ra_trees.c

Modified: subversion/branches/tree-read-api/subversion/include/private/svn_ra_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/private/svn_ra_private.h?rev=1411383&r1=1411382&r2=1411383&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/private/svn_ra_private.h (original)
+++ subversion/branches/tree-read-api/subversion/include/private/svn_ra_private.h Mon Nov
19 20:04:58 2012
@@ -274,6 +274,12 @@ svn_ra__replay_ev2(svn_ra_session_t *ses
 
 /* Set *TREE_P to a new tree object representing the subtree rooted at
  * the repository path of SESSION in revision REVNUM.
+ *
+ * REVNUM must be either a valid revision number within the repository, or
+ * SVN_INVALID_REVNUM meaning the head revision.  A request to use the head
+ * revision will be resolved to a revision number exactly once for this
+ * tree, some time between calling this function and the first time an
+ * operation on this tree depends on it.
  */
 svn_error_t *
 svn_ra__open_tree(svn_tree_t **tree_p,

Modified: subversion/branches/tree-read-api/subversion/libsvn_ra/ra_trees.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_ra/ra_trees.c?rev=1411383&r1=1411382&r2=1411383&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_ra/ra_trees.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_ra/ra_trees.c Mon Nov 19 20:04:58
2012
@@ -207,6 +207,9 @@ svn_ra__open_tree(svn_tree_t **tree_p,
 {
   ra_tree_baton_t *tb = apr_palloc(result_pool, sizeof(*tb));
 
+  if (! SVN_IS_VALID_REVNUM(revnum))
+    SVN_ERR(svn_ra_get_latest_revnum(ra_session, &revnum, result_pool));
+
   tb->ra_session = ra_session;
   tb->revnum = revnum;
 



Mime
View raw message