Previous Next

SVN Remote Log Script · 506 days ago

Having used my SVN commit script for quite a while now; I realized that I was wanting any easy way to view the current HEAD revision of the log.

Wrote a new script; named it svnremotelog and put it in ~/bin/, also this alias svnlog="svnremotelog | less" in my .bash_profile:
#!/usr/bin/env ruby

dir = ARGV[0].nil? ? '.' : ARGV.shift

unless File.exists? dir
  puts "Not a valid folder.\a" #beep
  exit
end

info = `svn info #{dir}`

info =~ /URL:[\s]+([^\n]+)/
url = $1

puts "Getting remote log for #{url}"

puts `svn log -v #{url}`

Comments