subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dan...@apache.org
Subject svn commit: r933192 - in /subversion/trunk/subversion: include/private/svn_wc_private.h libsvn_client/deprecated.c libsvn_wc/deprecated.c libsvn_wc/util.c
Date Mon, 12 Apr 2010 11:17:01 GMT
Author: dannas
Date: Mon Apr 12 11:17:01 2010
New Revision: 933192

URL: http://svn.apache.org/viewvc?rev=933192&view=rev
Log:
Follow-up to r932571. Since converting a svn_wc_status3_t struct to a
svn_wc_status2_t dito will be a pretty complex operation, we create a
function to handle it.

* subversion/include/private/svn_wc_private.h
  (svn_wc__status2_from_3): New.

* subversion/libsvn_wc/util.c
  (svn_wc__status2_from_3): New.

* subversion/libsvn_wc/deprecated.c
  (status4_wrapper_func): Call the new func.

* subversion/libsvn_client/deprecated.c
  (status4_wrapper_func): Call the new func.

Suggested by: gstein
Approved by: julianfoad

Modified:
    subversion/trunk/subversion/include/private/svn_wc_private.h
    subversion/trunk/subversion/libsvn_client/deprecated.c
    subversion/trunk/subversion/libsvn_wc/deprecated.c
    subversion/trunk/subversion/libsvn_wc/util.c

Modified: subversion/trunk/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_wc_private.h?rev=933192&r1=933191&r2=933192&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Mon Apr 12 11:17:01 2010
@@ -289,6 +289,14 @@ svn_wc_conflict_description2_t *
 svn_wc__cd_to_cd2(const svn_wc_conflict_description_t *conflict,
                   apr_pool_t *result_pool);
 
+/*
+ * Convert from svn_wc_status3_t to svn_wc_status2_t.
+ * Allocate the result in RESULT_POOL.
+ */
+svn_wc_status2_t *
+svn_wc__status2_from_3(const svn_wc_status3_t *status, 
+                       apr_pool_t *result_pool);
+
 
 /**
  * Fetch the absolute paths of all the working children of @a dir_abspath

Modified: subversion/trunk/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/deprecated.c?rev=933192&r1=933191&r2=933192&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_client/deprecated.c Mon Apr 12 11:17:01 2010
@@ -42,6 +42,7 @@
 #include "client.h"
 #include "mergeinfo.h"
 
+#include "private/svn_wc_private.h"
 #include "svn_private_config.h"
 
 
@@ -1439,11 +1440,7 @@ status4_wrapper_func(void *baton,
   struct status4_wrapper_baton *swb = baton;
   svn_wc_status2_t *dup;
 
-
-  /* ### This conversion will involve a lot more once we start to actually
-   * ### do some changes in svn_wc_status3_t. We should probably create a
-   * ### specific function for handling the conversion */
-  dup = (svn_wc_status2_t *) svn_wc_dup_status3(status, scratch_pool);
+  dup = svn_wc__status2_from_3(status, scratch_pool);
 
   return (*swb->old_func)(swb->old_baton, path, dup, scratch_pool);
 }

Modified: subversion/trunk/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/deprecated.c?rev=933192&r1=933191&r2=933192&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_wc/deprecated.c Mon Apr 12 11:17:01 2010
@@ -2237,10 +2237,7 @@ status4_wrapper_func(void *baton,
   svn_wc_status2_t *dup;
   const char *path = local_abspath;
 
-  /* ### This conversion will involve a lot more once we start to actually
-   * ### do some changes in svn_wc_status3_t. We should probably create a
-   * ### specific function for handling the conversion */
-  dup = (svn_wc_status2_t *) svn_wc_dup_status3(status, scratch_pool);
+  dup = svn_wc__status2_from_3(status, scratch_pool);
 
   if (swb->anchor_abspath != NULL)
     {

Modified: subversion/trunk/subversion/libsvn_wc/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/util.c?rev=933192&r1=933191&r2=933192&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/util.c (original)
+++ subversion/trunk/subversion/libsvn_wc/util.c Mon Apr 12 11:17:01 2010
@@ -543,3 +543,10 @@ svn_wc__cd_to_cd2(const svn_wc_conflict_
 
   return new_conflict;
 }
+
+svn_wc_status2_t *
+svn_wc__status2_from_3(const svn_wc_status3_t *status, 
+                       apr_pool_t *scratch_pool)
+{
+  return (svn_wc_status2_t *) svn_wc_dup_status3(status, scratch_pool);
+}



Mime
View raw message