Sep 18
I want to move all files in this svn dir:
svn list http://svn.atld1/svn-prodops/sysadmin
to:
svn list http://svn.atld1/svn-prodops/sysadmin/scripts
Doing svn mv would see obvious and using xargs or -exec might work. I prefer not to use any brain energy on a shell script. I just do it in ruby in 5 minutes:
svn list http://svn.atld1/svn-prodops/sysadmin > /tmp/script.list
Write this to a ruby file:
f = File.open("/tmp/script.list")
f.each_line {|line|
cmd = "svn mv http://svn.atld1/svn-prodops/sysadmin/#{line.strip}
http://svn.atld1/svn-prodops/sysadmin/scripts/ -m
\"moving #{line} to scripts \" "
puts "running: #{cmd}"
`#{cmd}"
}
Now execute the file above after double checking. Viola done even with relevant comments for each move!
