Class: Redmine::Scm::Adapters::CvsRevisionHelper
- Inherits:
-
Object
- Object
- Redmine::Scm::Adapters::CvsRevisionHelper
- Defined in:
- lib/redmine/scm/adapters/cvs_adapter.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
Returns the value of attribute base.
-
#branchid ⇒ Object
Returns the value of attribute branchid.
-
#complete_rev ⇒ Object
Returns the value of attribute complete_rev.
-
#revision ⇒ Object
Returns the value of attribute revision.
Instance Method Summary collapse
- #branchVersion ⇒ Object
-
#initialize(complete_rev) ⇒ CvsRevisionHelper
constructor
A new instance of CvsRevisionHelper.
- #is_in_branch_with_symbol(branch_symbol) ⇒ Object
- #isBranchRevision ⇒ Object
- #prevRev ⇒ Object
Constructor Details
#initialize(complete_rev) ⇒ CvsRevisionHelper
Returns a new instance of CvsRevisionHelper.
417 418 419 420 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 417 def initialize(complete_rev) @complete_rev = complete_rev parseRevision() end |
Instance Attribute Details
#base ⇒ Object
Returns the value of attribute base.
415 416 417 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 415 def base @base end |
#branchid ⇒ Object
Returns the value of attribute branchid.
415 416 417 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 415 def branchid @branchid end |
#complete_rev ⇒ Object
Returns the value of attribute complete_rev.
415 416 417 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 415 def complete_rev @complete_rev end |
#revision ⇒ Object
Returns the value of attribute revision.
415 416 417 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 415 def revision @revision end |
Instance Method Details
#branchVersion ⇒ Object
422 423 424 425 426 427 428 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 422 def branchVersion if isBranchRevision return @base + "." + @branchid end @base end |
#is_in_branch_with_symbol(branch_symbol) ⇒ Object
442 443 444 445 446 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 442 def is_in_branch_with_symbol(branch_symbol) bpieces = branch_symbol.split(".") branch_start = "#{bpieces[0..-3].join(".")}.#{bpieces[-1]}" (branchVersion == branch_start) end |
#isBranchRevision ⇒ Object
430 431 432 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 430 def isBranchRevision !@branchid.nil? end |
#prevRev ⇒ Object
434 435 436 437 438 439 440 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 434 def prevRev unless @revision == 0 return buildRevision(@revision - 1) end buildRevision(@revision) end |