You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2011/10/26 13:39:51 UTC

svn commit: r1189138 - in /subversion/branches/showing-merge-info/subversion: include/svn_client.h libsvn_client/url.c

Author: julianfoad
Date: Wed Oct 26 11:39:50 2011
New Revision: 1189138

URL: http://svn.apache.org/viewvc?rev=1189138&view=rev
Log:
On the 'showing-merge-info' branch:

* subversion/include/svn_client.h
  (svn_client_target_t, svn_client__parse_target): Improve doc strings.
  (svn_client__target): Same, and allow a null peg.

* subversion/libsvn_client/url.c
  (svn_client__target): Allow a null peg.

Modified:
    subversion/branches/showing-merge-info/subversion/include/svn_client.h
    subversion/branches/showing-merge-info/subversion/libsvn_client/url.c

Modified: subversion/branches/showing-merge-info/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/include/svn_client.h?rev=1189138&r1=1189137&r2=1189138&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/include/svn_client.h (original)
+++ subversion/branches/showing-merge-info/subversion/include/svn_client.h Wed Oct 26 11:39:50 2011
@@ -1009,9 +1009,12 @@ svn_client_create_context(svn_client_ctx
 /* */
 typedef struct svn_client_target_t
   {
+    /* The following fields are assumed to be initialized and valid.
+     * peg_revision->kind and revision->kind may be 'unspecified'. */
     const char *path_or_url;
     const char *abspath_or_url;
     svn_opt_revision_t peg_revision;
+
     svn_opt_revision_t revision;
 
     /* The following fields are the resolved location after contacting
@@ -1025,15 +1028,18 @@ typedef struct svn_client_target_t
     apr_pool_t *pool;
   } svn_client_target_t;
 
-/* Allocate a svn_client_target_t structure. Initialize pool and
- * abspath_or_url fields. */
+/** Set @a *target to a new #svn_client_target_t structure. Initialize the
+ * @c abspath_or_url field as well as those corresponding to @a path_or_url,
+ * @a peg_revision and @a pool.  @a peg_revision may be NULL meaning
+ * unspecified. */
 svn_error_t *
 svn_client__target(svn_client_target_t **target,
                    const char *path_or_url,
                    const svn_opt_revision_t *peg_revision,
                    apr_pool_t *pool);
 
-/* Like svn_opt_parse_path(). */
+/** Like svn_opt_parse_path() but constructs a new #svn_client_target_t
+ * structure. */
 svn_error_t *
 svn_client__parse_target(svn_client_target_t **target,
                          const char *target_string,
@@ -1053,7 +1059,7 @@ svn_client__resolve_location(const char 
                              apr_pool_t *result_pool,
                              apr_pool_t *scratch_pool);
 
-/* @a ra_session_p is an optional in/out parameter. If an RA session is
+/** @a ra_session_p is an optional in/out parameter. If an RA session is
  * needed and @a ra_session_p and @a *ra_session_p are both non-null, use
  * that session; otherwise open a new sesssion (allocated
  * in @a target->pool) and if @a ra_session_p is non-null then set

Modified: subversion/branches/showing-merge-info/subversion/libsvn_client/url.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_client/url.c?rev=1189138&r1=1189137&r2=1189138&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_client/url.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_client/url.c Wed Oct 26 11:39:50 2011
@@ -70,6 +70,7 @@ svn_client__target(svn_client_target_t *
                    const svn_opt_revision_t *peg_revision,
                    apr_pool_t *pool)
 {
+  svn_opt_revision_t unspecified_rev = { svn_opt_revision_unspecified, { 0 } };
   *target_p = apr_pcalloc(pool, sizeof(**target_p));
 
   (*target_p)->pool = pool;
@@ -79,7 +80,7 @@ svn_client__target(svn_client_target_t *
   else
     svn_error_clear(svn_dirent_get_absolute(&(*target_p)->abspath_or_url,
                                     path_or_url, pool));
-  (*target_p)->peg_revision = *peg_revision;
+  (*target_p)->peg_revision = peg_revision ? *peg_revision : unspecified_rev;
   return SVN_NO_ERROR;
 }