Fix issue #4225, "Add '--include-externals' option to svn list".
* subversion/include/svn_client.h
(svn_client_list_func2_t): New type used to notify externals information.
(svn_client_list_func_t): Deprecate type.
(svn_client_list3): New function, which has a new argument
include_externals.
(svn_client_list2): Deprecate it.
* subversion/libsvn_client/client.h
(svn_client__list_internal): New function.
(svn_client__list_externals): New function.
* subversion/libsvn_client/deprecated.c
(list_func_wrapper_baton): New struct to deprecate svn_client_list2().
(list_func_wrapper, wrap_list_func): Helper functions to deprecate
svn_client_list2().
(svn_client_list2): Call svn_client_list3 with include_externals set to
FALSE, and use svn_client_list_func2_t as callback implemented by
list_func_wrapper().
* subversion/libsvn_client/externals.c
(list_external_items): New static function that walks through all the
externals under list target recursively and list them using
svn_client_list3().
(svn_client__list_externals): New function to parse externals description
and list it using list_external_items().
* subversion/libsvn_client/list.c
(get_dir_contents): Populate the hash table 'externals'. Use
svn_client_list_func2_t instead of svn_client_list_func_t to report file
and directory entries. Use external_parent_url and external_target when
external items are being listed.
(svn_client__list_internal): New function. Same as svn_client_list3(), it
accepts few additional parameters that carries external information.
If include_externals is set, process all the externals which are populated
by get_dir_contents() using svn_client__list_externals().
(svn_client_list3): New function, thin wrapper around
svn_client__list_internal().
* subversion/svn/list-cmd.c
(print_baton): Add few structure members to keep track of last seen external
information.
(print_dirent): Implement svn_client_list_func2_t to control the output when
used with externals.
(print_dirent_xml): Implement svn_client_list_func2_t. Enclose the external
items in the element <..>
(svn_cl__list): Call svn_client_list3(). Handle if there are any errors
during externals processing.
* subversion/svn/main.c
(svn_cl__cmd_table): Enable include_externals for 'list' and give a short
description about the option.
* subversion/tests/cmdline/externals_tests.py
(include_externals): Rename it to 'commit_include_externals'.
(list_include_externals): New test.
(test_list): Add a reference to the new test. Rename 'include_externals' to
'commit_include_externals'.
Patch by: Vijayaguru G
Review by: stsp, julianfoad