Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to determine the Working Copy size before checkout?

Tags:

svn

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.

like image 734
guerda Avatar asked Jun 02 '10 07:06

guerda


People also ask

What is SVN base file?

What is an SVN-BASE file? File created by Subversion, an open source version control system; stores a base copy of a file that is checked out from the Subversion repository; used to compare the working copy of a project file against its latest checked out version.

How do I checkout a working copy in SVN?

Open the SVN server, right-click on the repository and select the copy URL to clipboard (for the VIsualSVN server) and paste it on the command line. User credentials will be the same as what we set at the time of user creation. After every successful checkout operation, the output will print a revision number.

How do I find the size of an SVN repository?

To see disk space usage for an individual Subversion repository, click Repositories in the main navigation bar, select the checkbox for the repository and click Info. To see the disk space used by all repositories, see the Disk space chart in the Administration > Statistics page.


2 Answers

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.).

like image 76
Edmund Avatar answered Sep 21 '22 20:09

Edmund


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

like image 28
High Performance Mark Avatar answered Sep 25 '22 20:09

High Performance Mark