Is there a way to count/calculate the total size of a svn directory if you were to checkout a revision?
I have limited internet downloads so I need to know how big something is before I go and download it.
Thank you.
Name. svnlook filesize — Print the size (in bytes) of a versioned file.
svn folder, the . svn folder contains a folder titled pristine which contains copies of your current project. I have no use for these copies which take up a ton of space, and reducing the size of my project will also reduce the time it takes to compile.
Check out files from Subversion repositoryIn the Get from Version Control dialog, click Add Repository Location and specify the repository URL. Click Check Out. In the dialog that opens, specify the destination directory where the local copy of the repository files will be created, and click OK.
SVN checkout has a handy --depth with the following options (from the documentation): --depth empty : Include only the immediate target of the operation, not any of its file or directory children. --depth files : Include the immediate target of the operation and any of its immediate file children.
This is my modification to the answer. It reports how many files are below a certain directory in svn and the total size.
svn list -vR svn://svn/repo/subdir|awk '{if ($3 !="") sum+=$3; i++} END {print "\ntotal size= " sum/(1024*1024)" MB" "\nnumber of files= " i/1000 " K"}'
Using the below, you can determine the size of individual files.
svn list --verbose --recursive http://svn/repo/path
Maybe you can look around this command to find a way?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With