Checkout
Branko ─îibej
committed
on 27 Nov 18
Consolidate file size formatting for 'svn info' and 'svn list'.

* subversion/svn/cl.h
(svn_cl__size_unit_t): Renamed and extended from sv… Show more
Consolidate file size formatting for 'svn info' and 'svn list'.

* subversion/svn/cl.h

 (svn_cl__size_unit_t): Renamed and extended from svn_cl__unit_base_t.

 (svn_cl__opt_state_t): New field 'file_size_unit' replaces the

  'human_readable' flag. All users updated.

 (svn_cl__format_file_size): Renamed from svn_cl__get_unit_file_size.

* subversion/svn/filesize.c

 (get_base2_unit_file_size, get_base10_unit_file_size): Tweak some comments.

 (svn_cl__format_file_size): Renamed from svn_cl__get_unit_file_size.

  Also handle formatting for XML and for normal output.

* subversion/svn/info-cmd.c

 (print_info_baton_t): 'file_size_unit' replaces the 'human_readable' flag.

 (print_info_xml): Use svn_cl__format_file_size() in XML mode.

 (print_info): Use only svn_cl__format_file_size() for file sizes.

 (print_info_item): Likewise.

 (svn_cl__info): Allow unit-based file size output with --show-item.

* subversion/svn/list-cmd.c

 (print_baton): 'file_size_unit' replaces the 'human_readable' flag.

 (print_dirent): Use only svn_cl__format_file_size() for file sizes.

 (print_dirent_xml): Use svn_cl__format_file_size() in XML mode.

 (svn_cl__list): Update for changes to svn_cl__opt_state_t.

* subversion/svn/svn.c

 (sub_main): Handle the new file_size_unit field in svn_cl__opt_state_t.

* subversion/tests/cmdline/info_tests.py

 (info_item_size_repos): Add two new test modes.

Show less