subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1687266 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/resolved.c svn/conflict-callbacks.c
Date Wed, 24 Jun 2015 13:37:28 GMT
Author: stsp
Date: Wed Jun 24 13:37:28 2015
New Revision: 1687266

URL: http://svn.apache.org/r1687266
Log:
Replace the svn_client_conflict_get_mime_type() macro with a new function
called svn_client_conflict_text_get_mime_type().

* subversion/include/svn_client.h
  (svn_client_conflict_text_get_mime_type): Declare new function.
  (svn_client_conflict_get_mime_type): Remove macro.

* subversion/libsvn_client/resolved.c
  (svn_client_conflict_text_get_mime_type): Implement.

* subversion/svn/conflict-callbacks.c
  (handle_text_conflict): Update caller.

Modified:
    subversion/trunk/subversion/include/svn_client.h
    subversion/trunk/subversion/libsvn_client/resolved.c
    subversion/trunk/subversion/svn/conflict-callbacks.c

Modified: subversion/trunk/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1687266&r1=1687265&r2=1687266&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_client.h (original)
+++ subversion/trunk/subversion/include/svn_client.h Wed Jun 24 13:37:28 2015
@@ -4455,6 +4455,15 @@ svn_client_conflict_prop_get_propvals(
   const svn_wc_conflict_description2_t *conflict,
   apr_pool_t *result_pool);
 
+/**
+ * Return the MIME-type of the working version of the text-conflicted file
+ * described by @a conflict.
+ *
+ * @since: New in 1.10.
+ */
+const char *
+svn_client_conflict_text_get_mime_type(
+  const svn_wc_conflict_description2_t *conflict);
 
 /**
  * Accessor functions for svn_wc_conflict_description2_t. This is a temporary
@@ -4464,9 +4473,6 @@ svn_client_conflict_prop_get_propvals(
  * @since New in 1.10. 
  */
 
-#define svn_client_conflict_get_mime_type(conflict) \
-  ((conflict)->mime_type)
-
 #define svn_client_conflict_get_base_abspath(conflict) \
   ((conflict)->base_abspath)
 

Modified: subversion/trunk/subversion/libsvn_client/resolved.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/resolved.c?rev=1687266&r1=1687265&r2=1687266&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/resolved.c (original)
+++ subversion/trunk/subversion/libsvn_client/resolved.c Wed Jun 24 13:37:28 2015
@@ -231,3 +231,14 @@ svn_client_conflict_prop_get_propvals(
 
   return SVN_NO_ERROR;
 }
+
+const char *
+svn_client_conflict_text_get_mime_type(
+  const svn_wc_conflict_description2_t *conflict)
+{
+  SVN_ERR_ASSERT_NO_RETURN(svn_client_conflict_get_kind(conflict)
+      == svn_wc_conflict_kind_text);
+
+  return conflict->mime_type;
+}
+

Modified: subversion/trunk/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/conflict-callbacks.c?rev=1687266&r1=1687265&r2=1687266&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/conflict-callbacks.c (original)
+++ subversion/trunk/subversion/svn/conflict-callbacks.c Wed Jun 24 13:37:28 2015
@@ -727,15 +727,12 @@ handle_text_conflict(svn_wc_conflict_res
   const char *local_relpath;
   const char *local_abspath = svn_client_conflict_get_local_abspath(desc);
   svn_boolean_t is_binary = svn_mime_type_is_binary(
-                              svn_client_conflict_get_mime_type(desc));
+                              svn_client_conflict_text_get_mime_type(desc));
   const char *base_abspath = svn_client_conflict_get_base_abspath(desc);
   const char *my_abspath = svn_client_conflict_get_my_abspath(desc);
   const char *their_abspath = svn_client_conflict_get_their_abspath(desc);
   const char *merged_file = svn_client_conflict_get_merged_file(desc);
 
-  SVN_ERR_ASSERT(svn_client_conflict_get_kind(desc) ==
-                 svn_wc_conflict_kind_text);
-
   local_relpath = svn_cl__local_style_skip_ancestor(b->path_prefix,
                                                     local_abspath,
                                                     scratch_pool);



Mime
View raw message