[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: file /directory size on svnServer?

From: netvampire.tw <netvampire.tw_at_yahoo.com.tw>
Date: Sat, 20 Mar 2010 11:13:12 +0800 (CST)

Thanks for your information would be helpful but I am on Windows. I separate using the output from svn ls -R --xml > size.xml then apply xslt to sum size. now I can estimate the size grows every day. I use this statistic to help monitor detail working status on svn every day now. I knew it would be 3 times space size to checkout from http://svn.apache.org/repos/asf/subversion/trunk/doc/user/svn-best-practices.html but don't know the sequence flow (which generate first tmp or base or realfile ) when svn checkout. ----- 原始信件 ---- 寄件者: Campbell Allan <campbell.allan@sword-ciboodle.com> 收件者: netvampire.tw <netvampire.tw@yahoo.com.tw> 副 本: users@subversion.apache.org 寄件日期: 2010/3/19 (五) 9:12:06 PM 主 旨: Re: file /directory size on svnServer? On Wednesday 17 Mar 2010, netvampire.tw wrote: > Is there any command can show files / directories size on the server? I > want to know if I have enough space before checkout Thanks I don't believe there is a command, it's difficult to get an accurate answer as each operating system has different overheads. If you are on unix then you could try this one liner, just replace SVNURL with the repository url you'd like to guess the size of. svn ls -v -R  SVNURL | perl -e 'my $total = 0; while(<>) { if( /^(?:\s+\S+) {2}\s+(\d+)/ ) { $total += $1; } } my $svntotal = $total * 3; print "Total file size: $total bytes, estimated checkout size $svntotal bytes\n";' I'm estimating at least three times the size for the checkout (this is with a 1.5 client) based on one repository I have available but I had originally guessed at twice the size plus a little for the administration directories and found it way off. The total bytes will be off as well though as this does not take into account filesystem overheads. In my test case the full checkout was around 884mb as measured by du -bs, deleting the .svn directories resulted in a size of 306mb yet summing up all the file sizes is 270mb according to the script. -- __________________________________________________________________________________ Sword Ciboodle is the trading name of ciboodle Limited (a company registered in Scotland with registered number SC143434 and whose registered office is at India of Inchinnan, Renfrewshire, UK, PA4 9LH) which is part of the Sword Group of companies. This email (and any attachments) is intended for the named recipient(s) and is private and confidential. If it is not for you, please inform us and then delete it. If you are not the intended recipient(s), the use, disclosure, copying or distribution of any information contained within this email is prohibited. Messages to and from us may be monitored. If the content is not about the business of the Sword Group then the message is neither from nor sanctioned by us. Internet communications are not secure. You should scan this message and any attachments for viruses. Under no circumstances do we accept liability for any loss or damage which may result from your receipt of this email or any attachment. __________________________________________________________________________________
Received on 2010-03-20 04:13:49 CET

This is an archived mail posted to the Subversion Users mailing list.