For some reason, my git svn fetch only brings a few revisions before stopping. So, I wrote a script to continue fetching until the string for a certain revision hasn’t been seen:
limit = "rXXXX" # pull until you see this string somewhere
stop = false
pull_number = 0
process = nil
trap("SIGINT") do
puts "Interrupt requested"
stop = true
Process.kill("KILL",process.pid) if process
end
loop do
pull_number += 1
break if stop
process = IO.popen("git svn fetch")
puts "pull number #{pull_number}"
process.each_line do |line|
puts line
if line=~/#{limit}/i
stop = true
end
end
end