Skip to content

Instantly share code, notes, and snippets.

@markjaquith
Created July 13, 2012 22:15
Show Gist options
  • Save markjaquith/3107902 to your computer and use it in GitHub Desktop.
Save markjaquith/3107902 to your computer and use it in GitHub Desktop.
Run this from a WordPress plugin SVN checkout to see what has changed in trunk vs your stable tag
#!/usr/bin/ruby
# NOTE: uses local diffs (MUCH faster). So make sure you've `svn up`d.
path = `svn info`[/Working Copy Root Path: (.*)\n/, 1]
stable_tag = nil
File.open path + '/trunk/readme.txt', 'r' do |file|
while line = file.gets
break if stable_tag = line[/stable tag: ?(.*)\n/i, 1]
end
end
print `diff -ur -x '.svn' #{path}/tags/#{stable_tag}/ #{path}/trunk/` + "\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment