subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bre...@apache.org
Subject svn commit: r1618883 - in /subversion/trunk/subversion: include/svn_wc.h libsvn_wc/deprecated.c libsvn_wc/info.c libsvn_wc/util.c
Date Tue, 19 Aug 2014 15:19:49 GMT
Author: breser
Date: Tue Aug 19 15:19:48 2014
New Revision: 1618883

URL: http://svn.apache.org/r1618883
Log:
Eliminate a warning about svn_wc__conflict_description2_dup().

This function is a public function with a private name.  Shortly,
svn_wc_conflict_description3_t will be removed.  So I'm leaving
the svn_wc__conflict_description2_dup() as deprecated but replacing
it with a now appropriately named svn_wc_conflict_description2_dup().

* subversion/include/svn_wc.h
  (svn_wc_conflict_description2_dup): New function.
  (svn_wc__conflict_description2_dup): Adjust the comment appropriately.
  (svn_wc_conflict_description2_t): Adjust the name of the dup function to
    modify if you change this.

* subversion/libsvn_wc/util.c
  (svn_wc_conflict_description2_dup): Moved from deprecated.c and renamed
    from svn_wc__conflict_description2_dup().

* subversion/libsvn_wc/deprecated.c
  (svn_wc__conflict_description2_dup): New implementation that just wraps
    svn_wc_conflict_description2_dup().

* subversion/libsvn_wc/info.c
  (svn_wc_info_dup): Adjust caller.


Modified:
    subversion/trunk/subversion/include/svn_wc.h
    subversion/trunk/subversion/libsvn_wc/deprecated.c
    subversion/trunk/subversion/libsvn_wc/info.c
    subversion/trunk/subversion/libsvn_wc/util.c

Modified: subversion/trunk/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc.h?rev=1618883&r1=1618882&r2=1618883&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_wc.h (original)
+++ subversion/trunk/subversion/include/svn_wc.h Tue Aug 19 15:19:48 2014
@@ -1959,7 +1959,7 @@ typedef struct svn_wc_conflict_descripti
   /** Info on the "merge-right source" or "their" version of incoming change. */
   const svn_wc_conflict_version_t *src_right_version;
 
-  /* Remember to adjust svn_wc__conflict_description2_dup()
+  /* Remember to adjust svn_wc_conflict_description2_dup()
    * if you add new fields to this struct. */
 } svn_wc_conflict_description2_t;
 
@@ -2216,10 +2216,22 @@ svn_wc__conflict_description3_dup(
   apr_pool_t *result_pool);
 
 
-/** Like svn_wc__conflict_description3_dup(), but duplicates objects
- * of type svn_wc_conflict_description2_t.
+/** Return a duplicate of @a conflict, allocated in @a result_pool.
+ * A deep copy of all members will be made.
+ *
+ * @since New in 1.9.
+ */
+svn_wc_conflict_description2_t *
+svn_wc_conflict_description2_dup(
+  const svn_wc_conflict_description2_t *conflict,
+  apr_pool_t *result_pool);
+
+
+/** Like svn_wc_conflict_description2_dup(), but is improperly named
+ * as a private function when it is intended to be a public API.
  *
  * @since New in 1.7.
+ *
  * @deprecated Provided for backward compatibility with the 1.8 API.
  */
 SVN_DEPRECATED

Modified: subversion/trunk/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/deprecated.c?rev=1618883&r1=1618882&r2=1618883&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_wc/deprecated.c Tue Aug 19 15:19:48 2014
@@ -4854,33 +4854,5 @@ svn_wc_conflict_description2_t *
 svn_wc__conflict_description2_dup(const svn_wc_conflict_description2_t *conflict,
                                   apr_pool_t *pool)
 {
-  svn_wc_conflict_description2_t *new_conflict;
-
-  new_conflict = apr_pcalloc(pool, sizeof(*new_conflict));
-
-  /* Shallow copy all members. */
-  *new_conflict = *conflict;
-
-  if (conflict->local_abspath)
-    new_conflict->local_abspath = apr_pstrdup(pool, conflict->local_abspath);
-  if (conflict->property_name)
-    new_conflict->property_name = apr_pstrdup(pool, conflict->property_name);
-  if (conflict->mime_type)
-    new_conflict->mime_type = apr_pstrdup(pool, conflict->mime_type);
-  if (conflict->base_abspath)
-    new_conflict->base_abspath = apr_pstrdup(pool, conflict->base_abspath);
-  if (conflict->their_abspath)
-    new_conflict->their_abspath = apr_pstrdup(pool, conflict->their_abspath);
-  if (conflict->my_abspath)
-    new_conflict->my_abspath = apr_pstrdup(pool, conflict->my_abspath);
-  if (conflict->merged_file)
-    new_conflict->merged_file = apr_pstrdup(pool, conflict->merged_file);
-  if (conflict->src_left_version)
-    new_conflict->src_left_version =
-      svn_wc_conflict_version_dup(conflict->src_left_version, pool);
-  if (conflict->src_right_version)
-    new_conflict->src_right_version =
-      svn_wc_conflict_version_dup(conflict->src_right_version, pool);
-
-  return new_conflict;
+  return svn_wc_conflict_description2_dup(conflict, pool);
 }

Modified: subversion/trunk/subversion/libsvn_wc/info.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/info.c?rev=1618883&r1=1618882&r2=1618883&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/info.c (original)
+++ subversion/trunk/subversion/libsvn_wc/info.c Tue Aug 19 15:19:48 2014
@@ -52,7 +52,7 @@ svn_wc_info_dup(const svn_wc_info_t *inf
       for (i = 0; i < info->conflicts->nelts; i++)
         {
           APR_ARRAY_PUSH(new_conflicts, svn_wc_conflict_description2_t *)
-            = svn_wc__conflict_description2_dup(
+            = svn_wc_conflict_description2_dup(
                 APR_ARRAY_IDX(info->conflicts, i,
                               const svn_wc_conflict_description2_t *),
                 pool);

Modified: subversion/trunk/subversion/libsvn_wc/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/util.c?rev=1618883&r1=1618882&r2=1618883&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/util.c (original)
+++ subversion/trunk/subversion/libsvn_wc/util.c Tue Aug 19 15:19:48 2014
@@ -310,6 +310,40 @@ svn_wc_conflict_version_create2(const ch
   return version;
 }
 
+svn_wc_conflict_description2_t *
+svn_wc_conflict_description2_dup(const svn_wc_conflict_description2_t *conflict,
+                                  apr_pool_t *pool)
+{
+  svn_wc_conflict_description2_t *new_conflict;
+
+  new_conflict = apr_pcalloc(pool, sizeof(*new_conflict));
+
+  /* Shallow copy all members. */
+  *new_conflict = *conflict;
+
+  if (conflict->local_abspath)
+    new_conflict->local_abspath = apr_pstrdup(pool, conflict->local_abspath);
+  if (conflict->property_name)
+    new_conflict->property_name = apr_pstrdup(pool, conflict->property_name);
+  if (conflict->mime_type)
+    new_conflict->mime_type = apr_pstrdup(pool, conflict->mime_type);
+  if (conflict->base_abspath)
+    new_conflict->base_abspath = apr_pstrdup(pool, conflict->base_abspath);
+  if (conflict->their_abspath)
+    new_conflict->their_abspath = apr_pstrdup(pool, conflict->their_abspath);
+  if (conflict->my_abspath)
+    new_conflict->my_abspath = apr_pstrdup(pool, conflict->my_abspath);
+  if (conflict->merged_file)
+    new_conflict->merged_file = apr_pstrdup(pool, conflict->merged_file);
+  if (conflict->src_left_version)
+    new_conflict->src_left_version =
+      svn_wc_conflict_version_dup(conflict->src_left_version, pool);
+  if (conflict->src_right_version)
+    new_conflict->src_right_version =
+      svn_wc_conflict_version_dup(conflict->src_right_version, pool);
+
+  return new_conflict;
+}
 
 svn_wc_conflict_version_t *
 svn_wc_conflict_version_dup(const svn_wc_conflict_version_t *version,



Mime
View raw message