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/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 (svn_client__list_externals): New function. Walk through all the externals under list target recursively and call svn_client_list3() for each external item. * 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. (svn_client_list3): New function. If include_externals is set, process all the externals which are populated by get_dir_contents() using svn_client__list_externals(). * subversion/svn/list-cmd.c (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__options): Short description about include_externals. (svn_cl__cmd_table): Enable include_externals for 'list'. * 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