Quantcast
Channel: Eigenjoy » Uncategorized
Viewing all articles
Browse latest Browse all 3

“who wrote this code?”

$
0
0

I just learned a really great svn feature. Its called “svn blame”. You run it on a file and it shows you who is responsible for writing each line. For instance:

[nathan@nate ~/s3]$ svn blame app/controllers/sites_controller.rb
...
   154       nate     @category = @breadcrumbs.last
   157       nate     @points   = @category.points
  1048       nate     (@category_points_name = @points.name =~/#{@site.brand}/ ? @points.name : "%s %s" % [@site.brand.capitalize,@points.name]) if @points
   316     moises     # check for category points get parents category points if none exist
   316     moises     if !@points || @points.size < 1
   316     moises       @points = @category.root.points
   316     moises     end
   316     moises
   157       nate     @current_category_names = params[:category_names]
   146       nate
   157       nate     @products      = @category.products
   871       nate     #NOT SURE IF THIS SHOULD BE HERE
   871       nate     @products.collect { |p| p.context = @site}
   616       nate     @products.sort! {|a,b| a.offer_price <=>b.offer_price }.reverse!
   626       nate     @products.delete_if { |p| !p.display_in_category?(@category) }
   632       nate     @products.delete_if { |p| !p.should_be_shown? }
...

Notice that it shows the revision number on the left along with who is responsible for each piece of code.

Share:

del.icio.us
Reddit
Technorati
Twitter
Facebook
Google Bookmarks
HackerNews
PDF
RSS




Viewing all articles
Browse latest Browse all 3

Trending Articles