Checkout
Julian Foad
committed
on 16 Apr
Report a revision's size on disk.

This adds an 'svnadmin rev-size' CLI and a libsvn_fs ioctl API to report
the total size in bytes of the r… Show more
Report a revision's size on disk.

This adds an 'svnadmin rev-size' CLI and a libsvn_fs ioctl API to report

the total size in bytes of the representation on disk of a revision,

including rev-props, excluding FSFS indexes.

   $ svnadmin rev-size /path/to/repo -r1

           1337 bytes in revision 1

* subversion/svnadmin/svnadmin.c

 (cmd_table): Add and document the 'rev-size' command.

 (revision_size,

  subcommand_rev_size): New.

* subversion/include/private/svn_fs_fs_private.h

 (svn_fs_fs__ioctl_revision_size_input_t,

  svn_fs_fs__ioctl_revision_size_output_t,

  SVN_FS_FS__IOCTL_REVISION_SIZE): New.

* subversion/libsvn_fs_fs/fs.c

 (fs_ioctl): Handle SVN_FS_FS__IOCTL_REVISION_SIZE.

* subversion/libsvn_fs_fs/fs_fs.h

* subversion/libsvn_fs_fs/stats.c

 (svn_fs_fs__revision_size,

  rev_size_index_entry_cb,

  rev_size_baton_t): New.

* subversion/libsvn_fs_fs/revprops.h

* subversion/libsvn_fs_fs/revprops.c

 (svn_fs_fs__get_revision_props_size): New.

* tools/client-side/bash_completion

 (_svnadmin): Add 'rev-size'.

Show less