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
This commit is contained in:
Toshi MARUYAMA 2011-04-11 10:24:44 +00:00
parent a5384e4e88
commit 0606dfdb62
1 changed files with 3 additions and 8 deletions

View File

@ -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