Merged r4613 from trunk.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.1-stable@4614 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2011-01-02 09:52:29 +00:00
parent 730fcef844
commit 119732c3ee
16 changed files with 161 additions and 24 deletions
+12 -1
View File
@@ -271,7 +271,8 @@ module Redmine
end
class Revision
attr_accessor :identifier, :scmid, :name, :author, :time, :message, :paths, :revision, :branch
attr_accessor :scmid, :name, :author, :time, :message, :paths, :revision, :branch
attr_writer :identifier
def initialize(attributes={})
self.identifier = attributes[:identifier]
@@ -285,6 +286,16 @@ 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
end
def save(repo)
Changeset.transaction do
changeset = Changeset.new(
+7
View File
@@ -264,6 +264,13 @@ module Redmine
return nil if $? && $?.exitstatus != 0
cat
end
class Revision < Redmine::Scm::Adapters::Revision
# Returns the readable identifier
def format_identifier
identifier[0,8]
end
end
end
end
end