Skip to content

Instantly share code, notes, and snippets.

@rbarazi
Created June 23, 2016 02:47
Show Gist options
  • Save rbarazi/2623461c9d158f312c1c72c6d562540c to your computer and use it in GitHub Desktop.
Save rbarazi/2623461c9d158f312c1c72c6d562540c to your computer and use it in GitHub Desktop.
Continue Converting SVN to GIT repo
head -4 REPO_NAME.dump > REPO_NAME-partial.dump && tail -n +$(grep -n "Revision-number: $(($(svn info file:///REPO_PATH/REPO_NAME | grep Revision | awk -F": " '{print $2}') + 1))" REPO_NAME.dump | awk -F":" '{print $1}') REPO_NAME.dump >> REPO_NAME-partial.dump && svnadmin load /REPO_PATH/REPO_NAME < REPO_NAME-partial.dump
@rbarazi
Copy link
Author

rbarazi commented Jun 24, 2016

puts repos.collect{|repo_name| %Q{head -4 #{repo_name}.dump > #{repo_name}-partial.dump && tail -n +$(grep -n "Revision-number: $(($(svn info file:///Volumes/SSD/WindCreek/svn-repos/#{repo_name} | grep Revision | awk -F": " '{print $2}') + 1))$" #{repo_name}.dump | awk -F":" '{print $1}') #{repo_name}.dump >> #{repo_name}-partial.dump && svnadmin load REPO_PATH/#{repo_name} < #{repo_name}-partial.dump} if `echo $(grep -n "Revision-number: $(($(svn info file://REPO_PATH/#{repo_name} | grep Revision | awk -F": " '{print $2}') + 1))" #{repo_name}.dump | awk -F":" '{print $1}')`.strip.length > 0}.compact.join(" && ")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment