Mercurial > hg > soundsoftware-site
comparison lib/redmine/scm/adapters/abstract_adapter.rb @ 117:af80e5618e9b redmine-1.1
* Update to Redmine 1.1-stable branch (Redmine SVN rev 4707)
author | Chris Cannam |
---|---|
date | Thu, 13 Jan 2011 12:53:21 +0000 |
parents | 513646585e45 |
children | b859cc0c4fa1 051f544170fe |
comparison
equal
deleted
inserted
replaced
39:150ceac17a8d | 117:af80e5618e9b |
---|---|
269 }.last | 269 }.last |
270 end | 270 end |
271 end | 271 end |
272 | 272 |
273 class Revision | 273 class Revision |
274 attr_accessor :identifier, :scmid, :name, :author, :time, :message, :paths, :revision, :branch | 274 attr_accessor :scmid, :name, :author, :time, :message, :paths, :revision, :branch |
275 attr_writer :identifier | |
275 | 276 |
276 def initialize(attributes={}) | 277 def initialize(attributes={}) |
277 self.identifier = attributes[:identifier] | 278 self.identifier = attributes[:identifier] |
278 self.scmid = attributes[:scmid] | 279 self.scmid = attributes[:scmid] |
279 self.name = attributes[:name] || self.identifier | 280 self.name = attributes[:name] || self.identifier |
281 self.time = attributes[:time] | 282 self.time = attributes[:time] |
282 self.message = attributes[:message] || "" | 283 self.message = attributes[:message] || "" |
283 self.paths = attributes[:paths] | 284 self.paths = attributes[:paths] |
284 self.revision = attributes[:revision] | 285 self.revision = attributes[:revision] |
285 self.branch = attributes[:branch] | 286 self.branch = attributes[:branch] |
287 end | |
288 | |
289 # Returns the identifier of this revision; see also Changeset model | |
290 def identifier | |
291 (@identifier || revision).to_s | |
292 end | |
293 | |
294 # Returns the readable identifier. | |
295 def format_identifier | |
296 identifier | |
286 end | 297 end |
287 | 298 |
288 def save(repo) | 299 def save(repo) |
289 Changeset.transaction do | 300 Changeset.transaction do |
290 changeset = Changeset.new( | 301 changeset = Changeset.new( |