[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH v3] Conflict option labels

From: Ivan Zhakov <ivan_at_visualsvn.com>
Date: Fri, 14 Oct 2016 12:06:19 +0200

On 14 October 2016 at 11:43, Ivan Zhakov <ivan_at_visualsvn.com> wrote:
> On 13 October 2016 at 17:26, Patrick Steinhardt <ps_at_pks.im> wrote:
>> Hi,
>>
>> the third version re-adds the result pool to
>> `svn_client_conflict_option_get_lazel`.
>>
> [...]
>> @@ -582,15 +604,16 @@ prompt_string(const resolver_option_t *options,
>> }
>> else
>> {
>> - opt = options++;
>> - if (! opt->code)
>> + if (i >= options->nelts)
>> break;
>> + opt = APR_ARRAY_IDX(options, i, client_option_t *);
>> + i++;
>> }
>>
>> if (! first)
>> result = apr_pstrcat(pool, result, ",", SVN_VA_NULL);
>> s = apr_psprintf(pool, " (%s) %s", opt->code,
>> - opt->short_desc ? _(opt->short_desc) : opt->long_desc);
>> + opt->label ? _(opt->label) : opt->long_desc);
> The opt->label is already localized, so _() is not needed.
>
> Beside of that patch looks fine and I'm ready to commit it in current
> state. Stefan, do you have any comments on the patch?
>
Here is updated patch and log message that adapted to r1764848 changes.
[[
Move conflict resolution options' labels out of the client

* subversion/include/svn_client.h:
  (svn_client_conflict_option_get_label): New function.
* subversion/libsvn_client/conflicts.c:
  (svn_client_conflict_option_t): Add label.
  (add_resolution_option): Add label argument.
  (svn_client_conflict_option_get_label): New function.
  (svn_client_conflict_text_get_reslution_options,
   svn_client_conflict_prop_get_resolution_options,
   configure_option_accept_current_wc_state,
   configure_option_move_destination,
   configure_option_update_raise_moved_away_children,
   configure_option_incoming_add_ignore,
   configure_option_incoming_added_file_text_merge,
   configure_option_incoming_added_file_replace_and_merge,
   configure_option_incoming_added_dir_merge,
   configure_option_incoming_added_dir_replace,
   configure_option_incoming_added_dir_replace_and_merge,
   configure_option_incoming_delete_ignore,
   configure_option_incoming_delete_accept,
   configure_option_incoming_move_file_merge,
   configure_option_incoming_dir_merge,
   configure_option_local_move_file_merge,
   svn_client_conflict_tree_get_resolution_options): Set
   resolution option labels.
* subversion/svn/conflict-callbacks.c:
  (resolver_option_t): Remove short_desc and long_desc.
  (client_option_t): New struct for client options.
  (builtin_resolver_options): Remove short_desc and long_desc.
  (extra_resolver_options,
   extra_resolver_options_text,
   extra_resolver_options_prop,
   extra_resolver_options_tree): Convert to client_option_t.
  (find_option): Accept options as apr_array_header_t.
  (find_option_by_builtin): New function to create provided
  options from builtin library options.
  (find_option_by_id): Replaced by find_option_by_builtin.
  (prompt_string,
   help_string,
   prompt_user,
   build_text_conflict_options,
   build_prop_conflict_options,
   build_prop_text_conflict_options,
   handle_one_prop_conflict.
   build_tree_conflict_options,
   handle_tree_conflict): Accept options as apr_array_header_t.
]]

-- 
Ivan Zhakov

Received on 2016-10-14 12:07:12 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.