Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Idea] Check for free space before starting task #135

Open
vdebosse opened this issue Jul 7, 2021 · 0 comments
Open

[Idea] Check for free space before starting task #135

vdebosse opened this issue Jul 7, 2021 · 0 comments

Comments

@vdebosse
Copy link

vdebosse commented Jul 7, 2021

Hi,
After migrating huge projects and running out of space in the middle, I thought that we could have an option to check the size of the SVN repository against the available space on /tmp, before proceeding. It will save a lot of troubles for large repositories or VM with only a little space to spare.
I call it an option because it takes some time (over 10% overhead), but when disk space is an issue, this may be worth it.
The command I have found and tested is:
svn list -vR <svn://repository> | awk '{tmp=match($3,/[0-9]/);if(tmp){sum+=$3; i++}} END {print "\ntotal size= " sum/1024000" MB" "\nnumber of files= " i/1000 " K"}'
It is a bit pessimistic but overall quite accurate.

This requires either a linux shell for awk or a manual parsing in Java instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant