From 0606dfdb62b1c4d8b65fdeaa187feeb04a364d1c Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 11 Apr 2011 10:24:44 +0000 Subject: [PATCH] scm: move :identifier from to attr_accessor in AbstractAdapter::Revision class. All scms which support blame use identifier. This commit remove the link of cvs blame revision. Redmine can not handle cvs revision (e.g. 1.2) as changeset identifier. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5403 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/abstract_adapter.rb | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/redmine/scm/adapters/abstract_adapter.rb b/lib/redmine/scm/adapters/abstract_adapter.rb index aadf551ca..5addbfe09 100644 --- a/lib/redmine/scm/adapters/abstract_adapter.rb +++ b/lib/redmine/scm/adapters/abstract_adapter.rb @@ -300,8 +300,8 @@ module Redmine end class Revision - attr_accessor :scmid, :name, :author, :time, :message, :paths, :revision, :branch - attr_writer :identifier + attr_accessor :scmid, :name, :author, :time, :message, + :paths, :revision, :branch, :identifier def initialize(attributes={}) self.identifier = attributes[:identifier] @@ -315,14 +315,9 @@ module Redmine self.branch = attributes[:branch] end - # Returns the identifier of this revision; see also Changeset model - def identifier - (@identifier || revision).to_s - end - # Returns the readable identifier. def format_identifier - identifier + self.identifier.to_s end end -- 2.39.5