Checkout
Karl Fogel
committed
on 28 May 02
Sorry, but just couldn't take it anymore :-).

Use plain C strings for paths and for attributes throughout the code.
At root this was a chan… Show more
Sorry, but just couldn't take it anymore :-).

Use plain C strings for paths and for attributes throughout the code.

At root this was a change to the svn_path and svn_wc functions, but

the effects naturally propagate to svn_client, etc.

Things to do after this commit:

  - There were a few "###" todo comments introduced, review them

  - Of these, the one in adm_crawler.c:report_revisions is most urgent

  - Do a search for all remaining svn_stringbuf_t, review them

  - Have not adjusted the language bindings; am assuming the binding

    maintainers will do that (sorry, hope it's not too bad).

* subversion/include/svn_wc.h: Remove obsolete comment about

 parameters that look like "apr_array_header_t *paths".

 (svn_wc_resolve_conflict, svn_wc_entries_read, svn_wc_entry,

 svn_wc_conflicted_p, svn_wc_process_committed svn_wc_add,

 svn_wc_copy, svn_wc_delete, svn_wc_status, svn_wc_statuses,

 svn_wc_check_wc, svn_wc_cleanup, svn_wc_revert,

 svn_wc_remove_from_revision_control, svn_wc_crawl_revisions,

 svn_wc_get_checkout_editor, svn_wc_get_update_editor,

 svn_wc_has_binary_prop, svn_wc_get_ancestry, svn_wc_get_status,

 svn_wc_get_status_editor, svn_wc_get_switch_editor,

 svn_wc_get_diff_editor, svn_wc_diff, svn_wc_get_actual_target,

 svn_wc_is_wc_root, svn_wc_translated_file, svn_wc_props_modified_p,

 svn_wc_text_modified_p, svn_wc_transmit_prop_deltas,

 svn_wc_transmit_text_deltas, svn_wc_get_auth_file,

 svn_wc_set_auth_file, svn_wc_create_tmp_file,

 svn_wc_get_pristine_copy_path, svn_wc_unlock, svn_wc_unlock,

 svn_wc_locked): Update interfaces to use plain strings.  See code

 changes for details.

 (struct svn_wc_entry_t): Change name, url, repos, copyfrom_url,

 conflict_old, conflict_new, conflict_wrk, prejfile, cmt_author, and

 even checksum to const char *.

* subversion/libsvn_wc/entries.c

 (svn_wc_entries_read, svn_wc_entry, read_entries): Take path as

 plain string.

 (write_entry): Store all attributes as plain strings in the hash.

 (check_entries): Same for path, even though #if'd out.

 (svn_wc__atts_to_entry): Use plain strings internally.

 (svn_wc__entries_write): Take path as plain string.

 (fold_entry, svn_wc__entry_remove): Take name as plain string.

 (svn_wc__entry_modify): Take path and name as plain strings.

 (svn_wc_entry_dup): Use plain strings internally.

 (fold_scheduling): Take name as plain string.

 (svn_wc__tweak_entry): Take name and new_url as plain strings.

 (svn_wc__compose_paths): Add a note to anyone contemplating

 reactivating this function.

 (svn_wc__entries_init): Take path as plain string.

* subversion/libsvn_wc/adm_files.h: Update prototypes for for the

 semi-public functions in the list below.

* subversion/libsvn_wc/adm_files.c  

 (open_adm_file, close_adm_file, svn_wc__adm_path,

 extend_with_adm_name, svn_wc__adm_path_exists,

 svn_wc__make_adm_thing, sync_adm_file, svn_wc__text_base_path,

 svn_wc__remove_adm_file, svn_wc__empty_file_path,

 svn_wc__open_empty_file, svn_wc__close_empty_file,

 svn_wc__open_text_base, svn_wc__close_text_base,

 svn_wc__open_auth_file, svn_wc__close_auth_file,

 svn_wc__open_props, svn_wc__close_props, svn_wc__sync_props,

 check_adm_exists, make_empty_adm, init_adm_tmp_area,

 svn_wc__ensure_adm, svn_wc__sync_text_base, svn_wc__prop_path,

 svn_wc__prop_base_path, maybe_copy_file): Take plain strings, recode

 internals accordingly.

 (svn_wc__adm_subdir): Removed, as no one outside this file was

 calling this function.

 (adm_subdir): Add motivational commentary.

 (init_adm_file): Same prototype change.  Also, take contents as a

 plain C string & change all callers, and don't bother to find out

 how many bytes written, as we never used that information.

 (svn_wc__adm_destroy, svn_wc__adm_cleanup_tmp_area): Same prototype

 change.  Also, don't overwrap errors.

 (svn_wc_create_tmp_file): Take path as plain string, rewrite to use

 svn_wc__adm_path.

 (svn_wc__open_adm_file, svn_wc__close_adm_file): Same prototype

 change, plus get rid of some obsolete apr-pacification cruft.

 (chop_admin_name): Removed.

 (v_extend_with_adm_name): Return a new path, instead of extending

 the received path.

* subversion/libsvn_wc/adm_files.h

 (svn_wc__adm_subdir): Removed, see above.

* subversion/include/svn_path.h, subversion/libsvn_subr/path.c

 (svn_path_split_nts, svn_path_is_empty_nts,

 svn_path_remove_component_nts, svn_path_compare_paths_nts): New

 functions.

 (svn_path_split_if_file): Same as code change, and redocument.  Add

 note about how this should be moved to path.c.

 (svn_path_split): Doc cleanups.

 (svn_path_is_url, svn_path_is_uri_safe): Take const char *, not

 svn_string_t *.

 (svn_path_condense_targets, svn_path_get_absolute): Use plain

 strings instead of stringbufs.

 (svn_path_get_longest_ancestor): Use non-const char * instead of

 stringbufs.

 (svn_path_canonicalize): Doc fix.

 (svn_path_canonicalize_nts): New function.

 (svn_path_is_child): Use const char * instead of stringbufs, remove

 duplicate doc string, and document allocation behavior and

 canonicalization requirement.

 (svn_path_decompose): Take path as plain string, return array of

 plain strings.  Store decompositions inline, instead of using

 store_component.

 (store_component): Removed this now-unnecessary function.

 (svn_path_uri_encode, svn_path_uri_decode): Take path as plain

 string, return plain string.

* subversion/libsvn_subr/target.c

 (svn_path_get_absolute, svn_path_split_if_file): Use plain strings

 instead of stringbufs, and add note about how these should be moved

 to path.c later.

 (svn_path_remove_redundancies): Adjust.

* subversion/libsvn_wc/questions.h

 (svn_wc__versioned_file_modcheck): Take versioned_file and

 base_file as plain strings.

 (svn_wc__files_contents_same_p, svn_wc__timestamps_equal_p): See

 code change.

* subversion/libsvn_wc/questions.c

 (svn_wc_check_wc, svn_wc__timestamps_equal_p): Take path as plain

 string.

 (svn_wc_conflicted_p): Take dir_path as plain string, rewrite to

 use plain strings internally too.

 (svn_wc_text_modified_p): Take filename as plain string, rewrite

 internals too.

 (svn_wc__versioned_file_modcheck): Take versioned_file and

 base_file as plain strings.

 (svn_wc__files_contents_same_p): Take path1 and path2 as plain

 strings.

 (svn_wc_has_binary_prop): Take path as plain string.

* subversion/libsvn_wc/lock.c

 (svn_wc_lock, svn_wc_unlock, svn_wc_locked): Take path as plain

 string.

* subversion/libsvn_client/checkout.c: Include svn_pools.h.

* subversion/libsvn_client/client.h

 (svn_client__open_ra_session): Same for base_url and base_dir.

 (svn_client__condense_commit_items): Take base_url as a non-const

 char **, and document new allocation behavior.

 (svn_client__checkout_internal, svn_client__update_internal): Same

 for path, xml_src, and, for the former, ancestor_path.

 (svn_client_checkout): Same for path, URL, and xml_src.

 (svn_client__do_commit): Take base_url as plain string.

 (struct svn_client__callback_baton_t): Store base_dir as plain

 string.

 (svn_client__get_diff_editor, svn_client__harvest_committables,

 svn_client__get_copy_committables, svn_client__can_delete): See code

 change.

* subversion/libsvn_client/commit.c

 (svn_client_commit): Same for param xml_dst, and internal vars

 base_dir, base_url, and display_dir.

 (get_ra_editor): Same for base_url, base_dir, log_msg.

 (svn_client_import): Take path, url, new_entry, and xml_dst as

 plain strings.  Adjust internal var log_msg accordingly, and adjust

 assignment of `path' in the commit item too.  Get rid of redundant

 use_xml flag variable.

 (import): Take path and new_entry as plain strings.

 (import_file): Take path as a plain string, adjust filepath

 allocation.

 (import_dir): Take path and edit_path as plain strings.  Move

 this_path and this_edit_path into the loop, as plain strings.

 (send_file_contents): Take path as a plain string.

 (unlock_dirs): Adjust.

* subversion/libsvn_wc/update_editor.c: Lots of internal code changed

 to deal with the conversion.  Not all symbols listed, I mean, it's

 just too big, and unlikely to be the target of a future search.

 (make_editor, struct edit_baton): Make anchor, target,

 ancestor_url, and switch_url be const char * instead of

 svn_stringbuf_t *.  Don't take or store a separate is_switch flag,

 just go by whether or not switch_url is null.

 (struct dir_baton, struct file_baton): Store path, name, and URL as

 plain strings.

 (svn_wc_get_actual_target, svn_wc_is_wc_root): Same, blah.

 (svn_wc_get_update_editor): Take anchor and target as plain strings.

 Adjust call to make_editor.

 (svn_wc_get_checkout_editor): Take dest and ancestor_url as plain

 strings.  Adjust call to make_editor.

 (svn_wc_get_switch_editor): Take anchor, target, and switch_url as

 plain strings.  Check that switch_url is not null.  Adjust call to

 make_editor.

 (maybe_bump_dir_revision): Use plain strings internally.

 (prep_directory): Take path and ancestor_url as plain strings.

 (svn_wc_install_file): Use plain strings internally.

 (add_or_open_file): Use plain strings internally.

 Note that this fixes a bug which had been causing basic_tests 1 to

 pass when it should have failed.  Namely, this line

    if (adding && apr_hash_get (dirents, fb->name, APR_HASH_KEY_STRING))

 which looks the same in both the old and the new code, but means

 different things.  In the old code, fb->name was a stringbuf, so the

 hash lookup returned NULL when sometimes it should have returned a

 dirent and thereby caused an error to be returned.  The failure to

 error meant that existing files (dirents) got silently overwritten

 by the incoming checkout/update!

* subversion/libsvn_client/apply_edits.c

 (apply_delta): Take const char * for dest and ancestor_path, instead

 of svn_stringbuf_t *.  Adjust anchor and target in the same way,

 internally.

 (do_edits, svn_client__checkout_internal,

 svn_client__update_internal): Same for path, xml_src, and URL.

* subversion/libsvn_client/commit_util.c

 (harvest_committables, add_committable): Take path, url,

 copyfrom_url as const char *, not svn_stringbuf_t *.

 (svn_client__condense_commit_items): Take base_url as a non-const

 char **, and convert internal url var to plain string.  Rewrite the

 way urls are relativized, hopefully without introducing any lifetime

 issues, see documentation change in client.h.  Fix comment typo.

 (svn_client__get_copy_committables): Take new_url and target as

 plain strings.

 (svn_client__sort_commit_item_urls): Use svn_path_compare_paths_nts.

 (svn_client__do_commit): Take base_url as const char *, although

 apparently it's only used in debug code anyway.  Rewrite.

 (lock_dir): Take dir as a plain string.

 (svn_client__harvest_committables): Take parent_dir as plain

 string.  Rewrite internal code to use plain strings.

* subversion/include/svn_client.h

 (svn_client_auth_baton_t): Constify username and password

 (svn_client_commit_item_t): Store path, url, copyfrom_url as

 const char *, not svn_stringbuf_t *.

 (svn_client_get_commit_log_t): Take log message pointer as const

 char *.  Redocument.

 (svn_client_checkout, svn_client_add, svn_client_import

 svn_client_commit, svn_client_status, svn_client_copy,

 svn_client_move, svn_client_delete, svn_client_resolve,

 svn_client_diff, svn_client_merge, svn_client_switch,

 svn_client_update, svn_client_revert, svn_client_cleanup): See code

 change.

* subversion/libsvn_client/add.c

 (svn_client_mkdir): Same, and same for log message.

 (add_dir_recursive): Construct fullpath as a plain string, not

 svn_stringbuf_t.

 (svn_client_add): Take const char *, not svn_stringbug_t * for

 path.

* subversion/libsvn_client/ra.c

 (svn_client__open_ra_session): Same for base_url and base_dir.

 (open_tmp_file): Use plain strings internally.

 (get_wc_prop, set_wc_prop): Adjust.

* subversion/include/svn_ra.h

 (svn_ra_plugin_t.get_commit_editor): Take log_msg as plain strings.

 (svn_ra_plugin_t.do_switch): Take update_target and switch_url as

 plain strings.

 (svn_ra_plugin_t.open): Take repos_URL as plain string.

 (svn_ra_plugin_t.do_update): Take update_target as plain string.

 (svn_ra_plugin_t.do_status): Take status_target as plain string.

 (svn_ra_plugin_t.get_file): Document the return types in props.

 (svn_ra_plugin_t.get_log): Document that paths is now an array of

 plain strings.

* subversion/libsvn_ra_dav/commit.c, subversion/libsvn_ra_dav/ra_dav.h

 (svn_ra_dav__get_commit_editor): Take log_msg as const char *.

 (struct commit_ctx_t): Store log_msg as const char *.

 (svn_ra_dav__do_update, svn_ra_dav__do_status,

 svn_ra_dav__do_switch): See code change.

 (escape_url): Remove this now-unnecessary function.

 (simple_request, do_checkout, do_proppatch, commit_stream_close):

 Adjust for above change to escape_url.

* subversion/libsvn_ra_local/ra_plugin.c

 (svn_ra_local__get_commit_editor): Take log_msg as plain string.

 (svn_ra_local__open): Take repos_URL as a plain string.

 (svn_ra_local__do_update): Take update_target as a plain string.

 (svn_ra_local__do_switch): Take update_target and switch_url as

 plain strings.

 (svn_ra_local__do_status): Take status_target as plain string.

 (svn_ra_local__get_log): Handle paths array as plain strings.

 (svn_ra_local__do_check_path): Use plain strings internally.

 (svn_ra_local__get_file): Use plain strings internally.  Create the

 values as svn_string_t *, not svn_stringbuf_t *.  Yes, that's

 right, this function and svn_ra_dav__get_file were doing it

 differently, heh heh heh.  We were saved by the fact that both

 svn_string_t and svn_stringbuf_t have `data' and `len' as the first

 two fields, in that order!  If those were all one accessed, then the

 two types were interchangeable, given a sane C compiler.

* subversion/libsvn_ra_local/ra_local.h

 (svn_ra_local__get_editor): Take log_msg as plain string.

 (svn_ra_local__session_baton_t): Store repository_URL, repos_path,

 and fs_path as plain strings.

 (svn_ra_local__split_URL, svn_ra_local__checkout): See code change.

* subversion/libsvn_ra_local/commit_editor.c

 (struct edit_baton): Store log_msg and base_path as plain strings.

 (svn_ra_local__get_editor): Take log_msg as plain string.

 (open_root): Pass log_message to svn_repos_fs_begin_txn_for_commit

 without any extra level of indirection.

 (add_directory): Adjust access of session string data.

* subversion/include/svn_repos.h

 (svn_repos_fs_begin_txn_for_commit, svn_repos_get_committed_info):

 See code change.

* subversion/libsvn_repos/hooks.c

 (svn_repos_fs_begin_txn_for_commit): Take log_msg as plain string.

* status.c

 (svn_client_status): Same for path.

* subversion/libsvn_wc/status.c

 (svn_wc_statuses, add_status_structure, assemble_status,

 add_unversioned_items, svn_wc_status): Same for path.

* subversion/libsvn_wc/log.c

 (struct log_runner): Store path as a plain string.

 (svn_wc__run_log, file_xfer_under_path, install_committed_file):

 Take path as plain string.

 (log_do_file_xfer): Take name as a plain string.  Remove unused

 full_path variable.

 (log_do_run_cmd, log_do_file_readonly, log_do_rm,

 log_do_modify_entry, log_do_committed): Use plain strings

 internally.

 (svn_wc_cleanup): Take path as a plain string.

* subversion/libsvn_wc/adm_ops.c

 (svn_wc_process_committed): Take path as plain string.  Rewrite

 internals to use plain strings too.

 (svn_wc_get_auth_file, svn_wc_set_auth_file): Take path as plain

 string.

 (svn_wc_delete): Same for path.

 (attempt_deletion): Take parent_dir and base_name as plain strings.

 (svn_wc_resolve_conflict): Take path as plain string.

 (svn_wc_add): Take path and copyfrom_url as plain strings.

 (svn_wc_remove_from_revision_control): Take path and name as plain

 strings.

 (recursively_tweak_entries): Take dirpath and base_url as plain

 strings.

 (svn_wc__do_update_cleanup): Take path and base_url as plain

 strings.

 (remove_file_if_present): Take file as a plain string.

 (revert_admin_things): Take parent_dir and name as plain strings.

 Rewrite to use plain strings internally.

 (revert_error): Take path as a plain string.

 (svn_wc_revert): Convert path.

 (mark_tree): Take dir as a plain string.

 (erase_from_wc): Take path as a plain string.

 (svn_wc_get_ancestry): Take path as plain string, return url as one.

 (svn_wc_get_pristine_copy_path): Take path, and return pristine

 path, as plain strings.

* subversion/libsvn_wc/props.c

 (svn_wc_props_modified_p): Take path as plain string, rewrite

 internals to use plain strings too.

 (empty_props_p): Take path_to_prop_file as plain string.

 (svn_wc__strip_entry_prefix): Removed; see header entry for why.

 (svn_wc__get_existing_prop_reject_file): Return reject file as a

 plain string.

 (svn_wc_merge_prop_diffs): Use plain strings internally.

 (svn_wc__merge_prop_diffs): Use plain strings internally.

 (wcprop_list): Use plain strings internally.

 (svn_wc__wcprop_set): Use plain strings internally.

 (svn_wc_prop_list): Use plain strings internally.

 (svn_wc_prop_set): Use plain strings internally.

 (svn_wc__has_props): Take path as a plain string.

 (svn_wc_get_prop_diffs): Use plain strings internally.

* subversion/include/svn_io.h, subversion/libsvn_subr/io.c

 (svn_io_open_unique_file): Return unique_name as plain string

 pointer.

 (svn_io_get_dirents): Take path as plain string.

 (svn_io_copy_dir_recursively): Take src, dst_parent, and

 dst_basename as plain strings.

 (svn_io_append_file): Take src and dst as plain strings.

 (svn_io_file_affected_time): Take path as a plain string.

* subversion/libsvn_wc/translate.c

 (svn_wc_translated_file): Take xlated_p and vfile as plain string

 pointer and plain string, respectively.

* subversion/libsvn_wc/adm_crawler.c

 (svn_wc_transmit_prop_deltas): Take path and tempfile as plain

 string and plain string pointer, respectively.

 (svn_wc_transmit_text_deltas, svn_wc_crawl_revisions): Take path as

 a plain string.

 (report_revisions): Take wc_path and dir_path as plain strings.

 Add note about kluge that needs to get fixed.

* subversion/libsvn_client/auth.c

 (store_auth_info): Take wc_path as a plain string.

* subversion/libsvn_client/copy.c

 (repos_to_repos_copy): Take src_url, dst_url, and message as plain

 strings.

 (wc_to_repos_copy): Take src_path, dst_url, and message as plain

 strings.

 (repos_to_wc_copy): Same for src_url and dst_path.

 (setup_copy): Same for src_path and dst_path.

 (wc_to_wc_copy): Same for src_path and dst_path.

 (svn_client_copy, svn_client_move): Same for src_path and dst_path.

* subversion/libsvn_client/delete.c

 (svn_client__can_delete, svn_client_delete): Same for path.

* subversion/libsvn_wc/copy.c

 (svn_wc_copy, copy_dir_administratively,

 copy_file_administratively): Take src_path, dst_parent, and

 dst_basename as plain strings.

 (svn_wc__remove_wcprops): Take path as plain string.

* subversion/libsvn_client/diff.c

 (convert_to_url): Same for path and returned url.

 (merge_file_added, merge_file_deleted, merge_dir_added,

 merge_dir_deleted): Use plain strings internally.

 (do_merge, do_single_file_merge): Same for path1, path2, and

 target_wcpath.

 (do_diff): Same for path1 and path2.

 (svn_client_diff): Take path1, path2 as plain strings.

 (svn_client_merge): Take path1, path2, and target_wcpath as plain

 strings.

 (diff_file_changed): Treat options array as plain strings.

* subversion/libsvn_client/repos_diff.c

 (svn_client__get_diff_editor): Same for target.

 (struct edit_baton): Store target and empty_file as plain strings.

 (struct file_baton): Store path_start_revision and path_end_revision

 as plain strings.

 (get_file_from_ra): Adjust for above change to file_baton.

 (struct temp_file_cleanup_s): Store path as plain string.

 (temp_file_cleanup_register): Adjust for above, document lifetime

 issues.

 (temp_file_plain_cleanup_handler): Adjust for above.

 (create_empty_file): Take empty_file as pointer to plain string.

 (window_handler, open_root, delete_entry, add_file,

 apply_textdelta): Adjust for string conversions.  Also, add some

 parentheses for clearer precedence.

 (get_empty_file): Take and set empty_file as plain string.

* subversion/libsvn_ra_dav/session.c

 (svn_ra_dav__open): Same for repos_URL.

* subversion/libsvn_ra_dav/fetch.c

 (svn_ra_dav__do_update): Same for update_target.

 (make_reporter): Take target as plain string.

 (svn_ra_dav__do_status): Take status_target as plain string.

 (svn_ra_dav__do_switch): Take update_target and switch_url as plain

 strings.

 (simple_fetch_file): Encode url as a plain string.

* subversion/libsvn_ra_dav/log.c

 (svn_ra_dav__get_log): The paths parameter is now an array of

 plain strings, adjust code accordingly.

* subversion/libsvn_client/resolve.c

 (svn_client_resolve): Take path as plain string.

* subversion/libsvn_client/revisions.c

 (svn_client__get_revision_number): Remove path conversion kluge, no

 longer necessary, aaahhh.

* subversion/libsvn_client/status.c

 (add_update_info_to_status_hash): Take path as plain string.

* subversion/libsvn_wc/diff.c: In various places, rename

 diff_callbacks to callbacks, and diff_cmd_baton to callback_baton,

 to avoid 80-column overwrap in the header file.

 (svn_wc_diff): Take anchor and target as plain strings.

 (svn_wc_get_diff_editor): Take anchor and target as plain strings.

 (file_diff): Take path as plain string.

 (struct edit_baton): Store anchor and target as plain strings.

 (struct dir_baton): Store path as a plain string.

 (struct file_baton): Store path and wc_path as plain strings.

 (make_editor_baton): Fix baton assignments.

 (make_dir_baton): Take name as a plain string.  Carefully rewrite

 path allocation in consequence, wipe hand over brow at how near came

 to missing that this was necessary.

 (make_file_baton): Take name as a plain string.  Rewrite some

 internals, and add note about suspected bug.

 (directory_elements_diff): Adjust.

 (delete_entry, add_directory, add_file, open_directory, open_file):

 Put in temporary shim to convert stringbuf arguments to plain

 strings.  This is the old editor interface, it would be a waste of

 time to convert it, since the editor itself will get converted

 eventually.

 (close_directory): Adjust internals.

 (temp_file_cleanup_handler): Adjust.

* subversion/libsvn_client/prop_commands.c

 (recursive_propget): Take propname and target as plain strings.

 (svn_client_proplist, recursive_proplist): Take target as a plain

 string.

* subversion/libsvn_ra_dav/props.c

 (create_private): Decode url as a plain string.

 (svn_ra_dav__get_props): Encode url as a plain string.

* subversion/libsvn_client/switch.c

 (svn_client_switch): Take path and switch_url as plain strings.

* subversion/libsvn_client/update.c (svn_client_update): Take path

 and xml_src as plain strings.

* subversion/libsvn_ra_local/split_url.c

 (svn_ra_local__split_URL): Take URL as plain string, return

 repos_path and fs_path as plain strings.  Use strncmp for safe

 comparisons.  Improve error messages.

* subversion/libsvn_ra_local/checkout.c

 (svn_ra_local__checkout): Take URL and fs_path as plain strings.

 (walk_tree): Take dir_path, edit_path, and URL as plain strings.

 (set_any_props): Take path as a plain string.  Set prop values as

 svn_string_t *, not svn_stringbuf_t *, see note above for

 svn_ra_local__get_file about why it was working before (gulp!).

 (send_file_contents): Take path as a plain string.

* subversion/libsvn_repos/rev_hunt.c

 (svn_repos_get_committed_info): Take path as a plain string, return

 committed_date and last_author as plain strings.

* subversion/libsvn_repos/log.c (svn_repos_get_logs): Handle incoming

 paths array as plain strings.

 (detect_changed): Take path as plain string.

* subversion/libsvn_wc/entries.h

 (svn_wc__entries_init, svn_wc__entries_write, svn_wc__entry_modify,

 svn_wc__entry_remove, svn_wc__tweak_entry): See code change.

 (svn_wc__atts_to_entry): Document behavior change.

* subversion/libsvn_wc/adm_ops.h

 (svn_wc__do_update_cleanup): See code change.

* subversion/libsvn_wc/log.h

 (svn_wc__log_commit, svn_wc__run_log): See code changes.

* subversion/libsvn_wc/props.h

 (svn_wc__remove_wcprops, svn_wc__has_props): Take path as a plain

 string.

 (svn_wc__strip_entry_prefix): Removed.  This was born in revision

 652 and still has no callers.  Time to say bye-bye.

* subversion/libsvn_client/revert.c

 (svn_client_revert): Take path as a plain string.

* subversion/libsvn_client/cleanup.c

 (svn_client_cleanup): Take dir as a plain string.

* subversion/libsvn_wc/merge.c

 (svn_wc_merge): Use plain strings internally.

* subversion/libsvn_wc/status_editor.c: Lots of internal code changed

 to deal with the conversion.  Not listing it all.

 (struct edit_baton): Store path as a plain string.

 (struct dir_baton, struct file_baton): Store name and path as plain

 strings.

* subversion/libsvn_wc/wc.h

 (svn_wc__ensure_directory): See code change.

* subversion/libsvn_wc/util.c

 (svn_wc__ensure_directory): Take path as plain string.

* subversion/clients/cmdline/add-cmd.c

 (svn_cl__add): Assume targets are plain strings.

* subversion/clients/cmdline/info-cmd.c

 (svn_cl__info): Same; plain strings internally.

* subversion/clients/cmdline/main.c

 (main): Use plain strings internally.

* subversion/clients/cmdline/merge-cmd.c

 (svn_cl__merge): Same.

* subversion/clients/cmdline/cl.h

 (svn_cl__opt_state_t): Store message, xml_file, target,

 ancestor_path, auth_username, auth_password, and extensions as plain

 strings.

 (svn_cl__make_log_msg_baton, svn_cl__get_trace_update_editor,

 svn_cl__edit_externally, svn_cl__get_trace_commit_editor

 svn_cl__get_log_message): See code change.

 (svn_cl__stringlist_to_array, svn_cl__newlinelist_to_array):

 Removed, we have svn_cstring_split for this now.

* subversion/clients/cmdline/trace-update.c

 (svn_cl__get_trace_update_editor): Take initial_path as a plain

 string.

 (struct edit_baton, struct dir_baton, struct file_baton): Store

 path as a plain string.

 (make_dir_baton, make_file_baton, delete_entry, add_directory,

 close_directory, close_file): Adjust accordingly.

* subversion/clients/cmdline/trace-commit.c

 (struct edit_baton, struct dir_baton, struct file_baton): Store

 path as plain string.

 (svn_cl__get_trace_commit_editor, make_dir_baton, make_file_baton,

 delete_entry, add_directory, close_directory, add_file, open_file,

 change_file_prop): Adjust accordingly.

* subversion/clients/cmdline/update-cmd.c

 (svn_cl__update): Use plain strings internally.

* subversion/clients/cmdline/checkout-cmd.c

 (svn_cl__checkout): Use plain strings internally.

* subversion/clients/cmdline/prompt.c

 (svn_cl__make_auth_baton): Use plain strings internally.

* subversion/clients/cmdline/commit-cmd.c

 (svn_cl__commit): Use plain strings internally.

* subversion/clients/cmdline/util.c: If people really need to return

 binary data in their log message contents, then some of these

 changes will have to be reverted.  Seems unlikely, though.

 (struct log_msg_baton): Hold message and base_dir as plain strings.

 (svn_cl__edit_externally): Take base_dir and contents as plain

 string, return edited_contents as a plain string.  

 (svn_cl__make_log_msg_baton): Take base_dir as a plain string.

 (svn_cl__stringlist_to_array, svn_cl__newlinelist_to_array):

 Removed, we have svn_cstring_split for this now.

 (svn_cl__args_to_target_array): Construct an array of plain

 strings, not stringbufs.

 (parse_path): Take path, and return truepath, as plain strings.

 (svn_cl__get_log_message): Use plain strings internally.

 (array_push_str): Replaces array_push_svn_stringbuf, just copies

 the string, does not convert the string's type.

* subversion/clients/cmdline/copy-cmd.c

 (svn_cl__copy): Use plain strings internally.

* subversion/clients/cmdline/delete-cmd.c

 (svn_cl__delete): Same.

* subversion/clients/cmdline/diff-cmd.c

 (svn_cl__diff): Use plain strings internally.  Just use

 svn_cstring_split now.

* subversion/clients/cmdline/feedback.c

 (notify_added): Use plain strings internally.

* subversion/clients/cmdline/mkdir-cmd.c

 (svn_cl__mkdir): Same.

* subversion/clients/cmdline/import-cmd.c

 (svn_cl__import): Same

* subversion/clients/cmdline/move-cmd.c

 (svn_cl__move): Same.

* subversion/clients/cmdline/propedit-cmd.c

 (svn_cl__propedit): Same.

* subversion/clients/cmdline/resolve-cmd.c

 (svn_cl__resolve): Same.

* subversion/clients/cmdline/revert-cmd.c

 (svn_cl__revert): Same.

* subversion/clients/cmdline/status-cmd.c

 (svn_cl__status): Same.

* subversion/clients/cmdline/status.c

 (print_long_format): Same.

* subversion/clients/cmdline/switch-cmd.c

 (svn_cl__switch): Same.

* subversion/clients/cmdline/proplist-cmd.c

 (svn_cl__proplist): Same.

* subversion/clients/cmdline/help-cmd.c

 (svn_cl__help): Same.

* subversion/clients/cmdline/propdel-cmd.c

 (svn_cl__propdel): Same.

* subversion/clients/cmdline/propget-cmd.c

 (svn_cl__propget): Same.

* subversion/clients/cmdline/props.c

 (svn_cl__print_prop_hash, svn_cl__print_prop_names): Same.

* subversion/clients/cmdline/propset-cmd.c

 (svn_cl__propset): Same.

* subversion/svnlook/main.c

 (open_writable_binary_file): Take path as a plain string.

 Fix casting of output from svn_path_decompose; the only reason it

 was working before is that the data happens to be the first element

 of svn_stringbuf_t (!!!).

 (print_diff_tree): Take path and base_path as plain strings.  Use a

 subpool for recursive calls.

 (dump_contents): Take path as plain string.

 (do_diff): Adjust calls to print_diff_tree.

* subversion/tests/libsvn_wc/checkout-test.c

 (apply_delta): Take dest and repos as plain strings.

 (main): Adjust.

* subversion/tests/libsvn_subr/path-test.c

 (test_path_is_child, test_is_url, test_uri_encode): Adjust.

* subversion/tests/libsvn_subr/target-test.c

 (main): Adjust.

* subversion/libsvn_ra_pipe/ra_pipe.c

 (svn_ra_pipe__get_commit_editor): Take log_msg as a plain string.

* subversion/tests/libsvn_delta/delta-combine-test.c

 (generate_file_diffs, do_delta_combination): Use plain strings

 internally.

* subversion/tests/clients/cmdline/basic_tests.py

 (basic_checkout): Expect repeated checkout to fail, not succeed.

 See note above in update_editor.c:add_or_open_file, and also

 revision 2011.

* subversion/include/svn_string.h

 (svn_cstring_split): Document that null input is allowed.  This

 redocuments svn_cstring_split_append too, by reference.

* subversion/libsvn_subr/svn_string.c

 (svn_cstring_split_append): Allow null input.  This affects

 svn_cstring_split as well.

XML changes:

* subversion/include/svn_xml.h

 (svn_xml_ap_to_hash, svn_xml_make_att_hash,

 svn_xml_hash_atts_preserving, svn_xml_hash_atts_overlaying,

 svn_xml_make_open_tag, svn_xml_make_open_tag_v,

 svn_xml_make_open_tag_hash): Document that attribute values are

 plain strings now.

* subversion/libsvn_subr/xml.c

 (svn_xml_ap_to_hash, amalgamate, svn_xml_hash_atts_preserving,

 svn_xml_hash_atts_overlaying, svn_xml_make_open_tag_hash,

 svn_xml_make_open_tag_v, svn_xml_make_open_tag): Use plain strings

 for attributes.

* subversion/libsvn_delta/xml_output.c

 (STR_REV): Replaces STR_BUF_REV, creates a plain string instead of

 a stringbuf.

Show less