Skip to content

Instantly share code, notes, and snippets.

@lorello
Last active February 23, 2016 11:43
Show Gist options
  • Select an option

  • Save lorello/b0b13eb9aaeeecf4c566 to your computer and use it in GitHub Desktop.

Select an option

Save lorello/b0b13eb9aaeeecf4c566 to your computer and use it in GitHub Desktop.
SVN Repository Report
#!/bin/bash
#
# Create a simple CSV report with relevant info about
# your old SVN repositories, so you can easly decide
# what archive offline and what migrate to GIT :)
#
REPO_ROOT=/var/svn/
REPOS=$(find $REPO_ROOT -mindepth 1 -maxdepth 1 -type d)
echo "name,size,last commit date,last commit author"
for REPO in $REPOS; do
REPO_NAME=$(basename $REPO)
REPO_SIZE=$(du -cs $REPO | head -1 | awk '{ print $1 }')
LAST_DATE=$(svnlook date $REPO | head -1 | awk '{ print $1 }')
LAST_AUTHOR=$(svnlook author $REPO)
echo "$REPO_NAME,$REPO_SIZE,$LAST_DATE,$LAST_AUTHOR"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment