Posted By

rduv on 10/09/06


Tagged

svn


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

webstic


svn diff


 / Published in: Ruby
 

URL: http://www.pjhyett.com/

  1. #!/usr/bin/env ruby `svn diff #{ARGV.join(' ')}`.each do |line| puts( if line =~ /^\+(.*)$/ "\e[32m#{$&}\e[0m" elsif line =~ /^-(.*)$/ "\e[31m#{$&}\e[0m" else line end ) end

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: jarjar2k7 on July 5, 2007

svn diff #{ARGV.join(' ')}.each do |line| puts(

if line =~ /^+(.)$/ "\e[32m#{$&}\e[0m" elsif line =~ /^-(.)$/ "\e[31m#{$&}\e[0m" else line end

)

end

Posted By: uther78 on April 29, 2011

svn diff #{ARGV.join(' ')}.each

You need to login to post a comment.