Class: Redmine::Scm::Adapters::Revision
- Inherits:
-
Object
- Object
- Redmine::Scm::Adapters::Revision
- Defined in:
- lib/redmine/scm/adapters/abstract_adapter.rb
Instance Attribute Summary
-
- (Object) author
Returns the value of attribute author.
-
- (Object) branch
Returns the value of attribute branch.
-
- (Object) identifier
Returns the value of attribute identifier.
-
- (Object) message
Returns the value of attribute message.
-
- (Object) name
Returns the value of attribute name.
-
- (Object) paths
Returns the value of attribute paths.
-
- (Object) revision
Returns the value of attribute revision.
-
- (Object) scmid
Returns the value of attribute scmid.
-
- (Object) time
Returns the value of attribute time.
Instance Method Summary
-
- (Revision) initialize(attributes = {})
constructor
A new instance of Revision.
- - (Object) save(repo)
Constructor Details
- (Revision) initialize(attributes = {})
A new instance of Revision
276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 276 def initialize(attributes={}) self.identifier = attributes[:identifier] self.scmid = attributes[:scmid] self.name = attributes[:name] || self.identifier self. = attributes[:author] self.time = attributes[:time] self. = attributes[:message] || "" self.paths = attributes[:paths] self.revision = attributes[:revision] self.branch = attributes[:branch] end |
Instance Attribute Details
- (Object) author
Returns the value of attribute author
274 275 276 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 274 def end |
- (Object) branch
Returns the value of attribute branch
274 275 276 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 274 def branch @branch end |
- (Object) identifier
Returns the value of attribute identifier
274 275 276 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 274 def identifier @identifier end |
- (Object) message
Returns the value of attribute message
274 275 276 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 274 def end |
- (Object) name
Returns the value of attribute name
274 275 276 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 274 def name @name end |
- (Object) paths
Returns the value of attribute paths
274 275 276 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 274 def paths @paths end |
- (Object) revision
Returns the value of attribute revision
274 275 276 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 274 def revision @revision end |
- (Object) scmid
Returns the value of attribute scmid
274 275 276 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 274 def scmid @scmid end |
- (Object) time
Returns the value of attribute time
274 275 276 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 274 def time @time end |
Instance Method Details
- (Object) save(repo)
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 288 def save(repo) Changeset.transaction do changeset = Changeset.new( :repository => repo, :revision => identifier, :scmid => scmid, :committer => , :committed_on => time, :comments => ) if changeset.save paths.each do |file| Change.create( :changeset => changeset, :action => file[:action], :path => file[:path]) end end end end |