subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1732059 - in /subversion/trunk/subversion/svn: info-cmd.c status.c
Date Wed, 24 Feb 2016 10:38:59 GMT
Author: stsp
Date: Wed Feb 24 10:38:59 2016
New Revision: 1732059

URL: http://svn.apache.org/viewvc?rev=1732059&view=rev
Log:
Replace calls to svn_client_conflict_from_wc_description2_t() with calls
to svn_client_conflict_get(). These calls are equivalent, except that the
latter needs a client context and a local abspath. The abspath is taken from
svn_wc_conflict_description2_t for now, since that's where our info/status
APIs put it. The context can be passed down from callers.

* subversion/svn/info-cmd.c
  (print_info_baton_t): Add 'ctx' client context member.
  (print_info_xml, print_info): Use svn_client_conflict_get(). 
  (svn_cl__info): Wire up 'ctx' in baton.

* subversion/svn/status.c
  (print_status): Use svn_client_conflict_get().

Modified:
    subversion/trunk/subversion/svn/info-cmd.c
    subversion/trunk/subversion/svn/status.c

Modified: subversion/trunk/subversion/svn/info-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/info-cmd.c?rev=1732059&r1=1732058&r2=1732059&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/info-cmd.c (original)
+++ subversion/trunk/subversion/svn/info-cmd.c Wed Feb 24 10:38:59 2016
@@ -162,6 +162,9 @@ typedef struct print_info_baton_t
 
   /* Did we already print a line of output? */
   svn_boolean_t start_new_line;
+
+  /* The client context. */
+  svn_client_ctx_t *ctx;
 } print_info_baton_t;
 
 
@@ -403,9 +406,9 @@ print_info_xml(void *baton,
 
           svn_pool_clear(iterpool);
 
-          SVN_ERR(svn_client_conflict_from_wc_description2_t(&conflict, desc,
-                                                             iterpool,
-                                                             iterpool));
+          SVN_ERR(svn_client_conflict_get(&conflict, desc->local_abspath,
+                                          receiver_baton->ctx,
+                                          iterpool, iterpool));
           SVN_ERR(svn_cl__append_conflict_info_xml(sb, conflict, iterpool));
         }
       svn_pool_destroy(iterpool);
@@ -609,10 +612,9 @@ print_info(void *baton,
 
               svn_pool_clear(iterpool);
 
-              SVN_ERR(svn_client_conflict_from_wc_description2_t(&conflict,
-                                                                 desc2,
-                                                                 iterpool,
-                                                                 iterpool));
+              SVN_ERR(svn_client_conflict_get(&conflict, desc2->local_abspath,
+                                              receiver_baton->ctx,
+                                              iterpool, iterpool));
               switch (svn_client_conflict_get_kind(conflict))
                 {
                   case svn_wc_conflict_kind_text:
@@ -695,8 +697,8 @@ print_info(void *baton,
 
             svn_client_conflict_t *conflict;
 
-            SVN_ERR(svn_client_conflict_from_wc_description2_t(&conflict, desc2,
-                                                               pool, pool));
+            SVN_ERR(svn_client_conflict_get(&conflict, desc2->local_abspath,
+                                            receiver_baton->ctx, pool, pool));
             if (!printed_tc)
               {
                 const char *desc;
@@ -926,6 +928,8 @@ svn_cl__info(apr_getopt_t *os,
   /* Add "." if user passed 0 arguments. */
   svn_opt_push_implicit_dot_target(targets, pool);
 
+  receiver_baton.ctx = ctx;
+
   if (opt_state->xml)
     {
       receiver = print_info_xml;

Modified: subversion/trunk/subversion/svn/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/status.c?rev=1732059&r1=1732058&r2=1732059&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/status.c (original)
+++ subversion/trunk/subversion/svn/status.c Wed Feb 24 10:38:59 2016
@@ -289,9 +289,8 @@ print_status(const char *target_abspath,
                                             local_abspath, pool, pool));
           SVN_ERR_ASSERT(desc2 != NULL);
 
-          SVN_ERR(svn_client_conflict_from_wc_description2_t(&tree_conflict,
-                                                             desc2,
-                                                             pool, pool));
+          SVN_ERR(svn_client_conflict_get(&tree_conflict, desc2->local_abspath,
+                                          ctx, pool, pool));
           tree_status_code = 'C';
           SVN_ERR(svn_cl__get_human_readable_tree_conflict_description(
                             &desc, tree_conflict, pool));



Mime
View raw message