工作副本将略大于存储库中各个文件大小的两倍,因为它在子目录中存储了每个文件的原始版本.svn。(它也存储其他管理数据,例如属性,但这应该不会太多。)
您需要某种方式列出存储库中的文件(从您要签出的子树)及其大小,然后对其进行总结。我不认为svn命令行工具会直接执行此操作,但它会为每个文件执行此操作:
svn ls -v -R file:///d:/svn/edmund/fs/trunk
2891 edmund Oct 23 2009 ./
2867 edmund 140 Aug 14 2009 Makefile
2883 Edmund 12869 Oct 15 2009 block.c
2883 Edmund 9817 Oct 15 2009 file.c
2883 Edmund 7572 Oct 15 2009 fs-internal.h
2884 edmund 6845 Oct 16 2009 fs.c
2891 edmund 1407 Oct 23 2009 fs.h
2891 edmund Oct 23 2009 linux/
2867 edmund 208 Aug 14 2009 linux/Makefile
2891 edmund 6684 Oct 23 2009 linux/main.c
2882 edmund 4822 Oct 15 2009 notes.txt
2891 edmund 7408 Oct 23 2009 operations.c
2891 edmund 3834 Oct 23 2009 special.c
2880 edmund Oct 01 2009 test/
2869 edmund 695 Aug 16 2009 test/Makefile
2880 edmund 11220 Oct 01 2009 test/operations-test.c
2877 edmund 3826 Aug 20 2009 test/tree-test.c
2883 Edmund 23413 Oct 15 2009 tree.c
2883 Edmund Oct 15 2009 win/
2883 Edmund 28590 Oct 15 2009 win/main.c
Run Code Online (Sandbox Code Playgroud)
您可以手动对这些值求和,或者通过管道传输到一个 scriptlet,该脚本将对第 12-26 列中的所有值求和(例如)。