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
- #branchPoint ⇒ Object
- #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.
377 378 379 380 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 377 def initialize(complete_rev) @complete_rev = complete_rev parseRevision() end |
Instance Attribute Details
#base ⇒ Object
Returns the value of attribute base.
375 376 377 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 375 def base @base end |
#branchid ⇒ Object
Returns the value of attribute branchid.
375 376 377 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 375 def branchid @branchid end |
#complete_rev ⇒ Object
Returns the value of attribute complete_rev.
375 376 377 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 375 def complete_rev @complete_rev end |
#revision ⇒ Object
Returns the value of attribute revision.
375 376 377 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 375 def revision @revision end |
Instance Method Details
#branchPoint ⇒ Object
382 383 384 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 382 def branchPoint return @base end |
#branchVersion ⇒ Object
386 387 388 389 390 391 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 386 def branchVersion if isBranchRevision return @base+"."+@branchid end return @base end |
#is_in_branch_with_symbol(branch_symbol) ⇒ Object
404 405 406 407 408 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 404 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 |
#isBranchRevision ⇒ Object
393 394 395 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 393 def isBranchRevision !@branchid.nil? end |
#prevRev ⇒ Object
397 398 399 400 401 402 |
# File 'lib/redmine/scm/adapters/cvs_adapter.rb', line 397 def prevRev unless @revision==0 return buildRevision(@revision-1) end return buildRevision(@revision) end |