> Seems to me it would be good for the name of the command-line option to
> include "property", e.g. "--prop-source-encoding". Â I note that this
> option is not intended to be used frequently so I don't imagine it's a
> problem to have a long name.
How about "--source-prop-encoding"?
>> > Index: subversion/svnsync/sync.h
>> > ===================================================================
>> > svnsync_normalize_revprops(apr_hash_t *rev_props,
>> > - Â Â Â Â Â Â Â Â Â Â Â Â Â int *normalized_count,
>> > + Â Â Â Â Â Â Â Â Â Â Â Â Â int *normalized_le_count,
>> > + Â Â Â Â Â Â Â Â Â Â Â Â Â const char *encoding,
>> > Â Â Â Â Â Â Â Â Â Â Â Â Â Â apr_pool_t *pool);
>> > Â svnsync_get_sync_editor(const svn_delta_editor_t *wrapped_editor,
>> > Â Â Â Â Â Â Â Â Â Â Â Â Â void *wrapped_edit_baton,
>> > Â Â Â Â Â Â Â Â Â Â Â Â Â svn_revnum_t base_revision,
>> > Â Â Â Â Â Â Â Â Â Â Â Â Â const char *to_url,
>> > + Â Â Â Â Â Â Â Â Â Â Â Â const char *prop_encoding,
>> > Â Â Â Â Â Â Â Â Â Â Â Â Â svn_boolean_t quiet,
>> > Â Â Â Â Â Â Â Â Â Â Â Â Â const svn_delta_editor_t **editor,
>> > Â Â Â Â Â Â Â Â Â Â Â Â Â void **edit_baton,
>> > - Â Â Â Â Â Â Â Â Â Â Â Â int *normalized_node_props_counter,
>> > + Â Â Â Â Â Â Â Â Â Â Â Â int *le_normalized_node_props_counter,
>
> Can you use the same names for the counter parameters? Â (I realize one
> is an output and the other is an in-out, but that doesn't appear to be
> the reason why they differ.) Â Also we normally use "EOL" for "end of
> line"; I haven't noticed the use of "LE" before.
Okay.
Note that I will be reverting the renames for now, but the variables
will have the same name in a different patch to rename them.
> Not directly related to this change, but ...
>
>> - Â int *normalized_node_props_counter; Â /* Where to count normalizations? */
>> + Â int *le_normalized_node_props_counter; Â /* Where to count line ending
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â normalizations? */
>> Â } edit_baton_t;
>>
>> @@ -407,9 +425,10 @@ change_file_prop(void *file_baton,
>> Â Â if (svn_prop_needs_translation(name))
>> Â Â Â {
>> Â Â Â Â svn_boolean_t was_normalized;
>
> It would be a good idea to rename this variable also, otherwise this is
> a bit confusing.
I agree.
>> - Â Â Â SVN_ERR(normalize_string(&value, &was_normalized, pool));
>> + Â Â Â SVN_ERR(normalize_string(&value, &was_normalized, eb->prop_encoding,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool, pool));
>> Â Â Â Â if (was_normalized)
>> - Â Â Â Â (*(eb->normalized_node_props_counter))++;
>> + Â Â Â Â (*(eb->le_normalized_node_props_counter))++;
>> Â Â Â }
>
> This kind of code can be simplified (removing one level of indirection)
> by making the baton hold the actual counter instead of a pointer to it.
Okay.
Received on 2011-01-07 22:09:59 CET