Quantcast
Viewing all articles
Browse latest Browse all 3

“who wrote this code?”

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:

Image may be NSFW.
Clik here to view.
del.icio.us

Image may be NSFW.
Clik here to view.
Reddit

Image may be NSFW.
Clik here to view.
Technorati

Image may be NSFW.
Clik here to view.
Twitter

Image may be NSFW.
Clik here to view.
Facebook

Image may be NSFW.
Clik here to view.
Google Bookmarks

Image may be NSFW.
Clik here to view.
HackerNews

Image may be NSFW.
Clik here to view.
PDF

Image may be NSFW.
Clik here to view.
RSS




Viewing all articles
Browse latest Browse all 3

Trending Articles