Subversion blame

While reading about git I found a feature of Subversion that I never used. It’s called svn blame and will show each line of a file with information about who last changed that line and in what revision. Running svn blame vendor/plugins/project_scores_plugin/init.rb for one of my Redmine plugins shows this:

     2     edavis # Redmine sample plugin
     2     edavis require 'redmine'
     2     edavis 
     2     edavis RAILS_DEFAULT_LOGGER.info 'Starting Project Scores plugin for Redmine'
     2     edavis 
     2     edavis Redmine::Plugin.register "scores_plugin" do
     2     edavis   name 'Project Scores Plugin'
     2     edavis   author 'Eric Davis of Little Stream Software'
     2     edavis   description 'This is a scoring plugin for Redmine that will allow projects to be scored'
     2     edavis   version '0.0.1'
     2     edavis 
     2     edavis   # This plugin adds a project module
     2     edavis   # It can be enabled/disabled at project level (Project settings -> Modules)
     2     edavis   project_module :score_module do
     2     edavis     # This permission has to be explicitly given
     2     edavis     # It will be listed on the permissions screen
     3     edavis     permission :view_scores, {:scores => [:index]}
     3     edavis     permission :edit_scores, {:scores => [:edit]}
    14     edavis     permission :view_score_options, {:score_options => [:index]}
    14     edavis     permission :edit_score_options, {:score_options => [:edit]}
     2     edavis   end
     2     edavis 
     2     edavis   # A new item is added to the project menu (because Redmine can't add it anywhere else)
     3     edavis   menu :project_menu, "Scores", :controller => 'scores', :action => 'index'
     2     edavis end

From that I can see the majority of the file was created on r2 the ‘score_options’ were added on r14. I’m still amazed whenever I find a new useful feature in my tools.

Eric

4 comments

  1. Ben Strackany says:

    Yep, I love this feature, too. I especially like the fact that they call it by one of it’s most common goals — find out who to blame for something. :)

Comments are closed.