tags:

views:

38

answers:

4

I would like to see if the working copy will fit onto my hard drive and don't want to waste time and bandwith.

So my question is: Is it possible to determine the size of the working copy before checkout?

I do have access to the repository, but its filesize does not say anything.

+1  A: 

Using TortoiseSVN I can see the size of files in the repo. but not of directories. That might help.

High Performance Mark
A: 

You cannot know the size before hand. If you know someone who has checked it out then you could ask them..

VoodooChild
A: 

Harddrives are cheap?! Seriously if you are worrying about harddrive space then your machine is either too old or you have far too much crap on there. I have 8 VM's (all about 4gb each) and a 46gb dataset and still not half full.

If you are spending hours of your time clearing away old stuff then you wasting your companies time and it will be cheaper for them to spend £40 on a new hdd.

graham.reeds
Thanks for your rating but I do want to know the size of the working copy before. It's more a theoretically, i would like to know how thing.
furtelwart
+1  A: 

The working copy will be a little larger than twice the size of the respective files in the repository, because it stored the pristine version of each in the .svn subdirectories. (It stores other admin data too, like properties, but this should not amount to much.)

You want some way of listing the files in the repository (from the subtree you want to check out), with their size, and summing it up. I do not think the svn command line tool does this directly, but it will do it for each file:

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

You could sum these manually, or pipe to a scriptlet that will sum all the values in columns 12-26 (e.g.).

Edmund