Class: Redmine::Scm::Adapters::CvsRevisionHelper
- Inherits:
-
Object
- Object
- Redmine::Scm::Adapters::CvsRevisionHelper
- Defined in:
- lib/redmine/scm/adapters/cvs_adapter.rb
Instance Attribute Summary
-
- (Object) base
Returns the value of attribute base.
-
- (Object) branchid
Returns the value of attribute branchid.
-
- (Object) complete_rev
Returns the value of attribute complete_rev.
-
- (Object) revision
Returns the value of attribute revision.
Instance Method Summary
- - (Object) branchPoint
- - (Object) branchVersion
-
- (CvsRevisionHelper) initialize(complete_rev)
constructor
A new instance of CvsRevisionHelper.
- - (Object) is_in_branch_with_symbol(branch_symbol)
- - (Object) isBranchRevision
- - (Object) prevRev
Constructor Details
- (CvsRevisionHelper) initialize(complete_rev)
A new instance of CvsRevisionHelper
304 305 306 307 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 304 def initialize(complete_rev) @complete_rev = complete_rev parseRevision() end |
Instance Attribute Details
- (Object) base
Returns the value of attribute base
302 303 304 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 302 def base @base end |
- (Object) branchid
Returns the value of attribute branchid
302 303 304 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 302 def branchid @branchid end |
- (Object) complete_rev
Returns the value of attribute complete_rev
302 303 304 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 302 def complete_rev @complete_rev end |
- (Object) revision
Returns the value of attribute revision
302 303 304 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 302 def revision @revision end |
Instance Method Details
- (Object) branchPoint
309 310 311 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 309 def branchPoint return @base end |
- (Object) branchVersion
313 314 315 316 317 318 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 313 def branchVersion if isBranchRevision return @base+"."+@branchid end return @base end |
- (Object) is_in_branch_with_symbol(branch_symbol)
331 332 333 334 335 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 331 def is_in_branch_with_symbol(branch_symbol) bpieces=branch_symbol.split(".") branch_start="#{bpieces[0..-3].join(".")}.#{bpieces[-1]}" return (branchVersion==branch_start) end |
- (Object) isBranchRevision
320 321 322 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 320 def isBranchRevision !@branchid.nil? end |
- (Object) prevRev
324 325 326 327 328 329 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 324 def prevRev unless @revision==0 return buildRevision(@revision-1) end return buildRevision(@revision) end |