You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2016/01/31 11:47:44 UTC

svn commit: r1727791 - /subversion/trunk/subversion/libsvn_client/resolved.c

Author: stsp
Date: Sun Jan 31 10:47:44 2016
New Revision: 1727791

URL: http://svn.apache.org/viewvc?rev=1727791&view=rev
Log:
* subversion/libsvn_client/resolved.c
  (svn_client_conflict_text_get_resolution_options,
  (svn_client_conflict_prop_get_resolution_options): Forgot to localize
   descriptions while copying conflict options from static arrays.

Found by: rhuijben

Modified:
    subversion/trunk/subversion/libsvn_client/resolved.c

Modified: subversion/trunk/subversion/libsvn_client/resolved.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/resolved.c?rev=1727791&r1=1727790&r2=1727791&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/resolved.c (original)
+++ subversion/trunk/subversion/libsvn_client/resolved.c Sun Jan 31 10:47:44 2016
@@ -1008,16 +1008,30 @@ svn_client_conflict_text_get_resolution_
     {
       for (i = 0; i < ARRAY_LEN(binary_conflict_options); i++)
         {
+          svn_client_conflict_option_t *option;
+
+          /* We must make a copy to make the memory for option->type_data
+           * writable and to localize the description. */
+          option = apr_pcalloc(result_pool, sizeof(*option));
+          *option = binary_conflict_options[i];
+          option->description = _(option->description);
           APR_ARRAY_PUSH((*options), const svn_client_conflict_option_t *) =
-            &binary_conflict_options[i];
+            option;
         }
     }
   else
     {
       for (i = 0; i < ARRAY_LEN(text_conflict_options); i++)
         {
+          svn_client_conflict_option_t *option;
+
+          /* We must make a copy to make the memory for option->type_data
+           * writable and to localize the description. */
+          option = apr_pcalloc(result_pool, sizeof(*option));
+          *option = text_conflict_options[i];
+          option->description = _(option->description);
           APR_ARRAY_PUSH((*options), const svn_client_conflict_option_t *) =
-            &text_conflict_options[i];
+            option;
         }
     }
 
@@ -1040,10 +1054,11 @@ svn_client_conflict_prop_get_resolution_
     {
       svn_client_conflict_option_t *option;
 
-      /* Property conflicts make use of type-specific data. We must make a
-       * mutable copy to make the memory for option->type_data writable. */
+      /* We must make a copy to make the memory for option->type_data
+       * writable and to localize the description. */
       option = apr_pcalloc(result_pool, sizeof(*option));
       *option = prop_conflict_options[i];
+      option->description = _(option->description);
       APR_ARRAY_PUSH((*options), const svn_client_conflict_option_t *) = option;
     }