@@ -393,20 +393,20 module Redmine | |||||
393 | def isBranchRevision |
|
393 | def isBranchRevision | |
394 | !@branchid.nil? |
|
394 | !@branchid.nil? | |
395 | end |
|
395 | end | |
396 |
|
396 | |||
397 | def prevRev |
|
397 | def prevRev | |
398 | unless @revision==0 |
|
398 | unless @revision == 0 | |
399 | return buildRevision(@revision-1) |
|
399 | return buildRevision( @revision - 1 ) | |
400 | end |
|
400 | end | |
401 |
return buildRevision(@revision) |
|
401 | return buildRevision( @revision ) | |
402 | end |
|
402 | end | |
403 |
|
403 | |||
404 | def is_in_branch_with_symbol(branch_symbol) |
|
404 | def is_in_branch_with_symbol(branch_symbol) | |
405 | bpieces=branch_symbol.split(".") |
|
405 | bpieces = branch_symbol.split(".") | |
406 | branch_start="#{bpieces[0..-3].join(".")}.#{bpieces[-1]}" |
|
406 | branch_start = "#{bpieces[0..-3].join(".")}.#{bpieces[-1]}" | |
407 | return (branchVersion==branch_start) |
|
407 | return ( branchVersion == branch_start ) | |
408 | end |
|
408 | end | |
409 |
|
409 | |||
410 | private |
|
410 | private | |
411 | def buildRevision(rev) |
|
411 | def buildRevision(rev) | |
412 | if rev== 0 |
|
412 | if rev== 0 | |
@@ -421,16 +421,16 module Redmine | |||||
421 | @base+"."+@branchid+"."+rev.to_s |
|
421 | @base+"."+@branchid+"."+rev.to_s | |
422 | end |
|
422 | end | |
423 | end |
|
423 | end | |
424 |
|
424 | |||
425 | # Interpretiert die cvs revisionsnummern wie z.b. 1.14 oder 1.3.0.15 |
|
425 | # Interpretiert die cvs revisionsnummern wie z.b. 1.14 oder 1.3.0.15 | |
426 | def parseRevision() |
|
426 | def parseRevision() | |
427 | pieces=@complete_rev.split(".") |
|
427 | pieces = @complete_rev.split(".") | |
428 | @revision=pieces.last.to_i |
|
428 | @revision = pieces.last.to_i | |
429 | baseSize=1 |
|
429 | baseSize = 1 | |
430 | baseSize+=(pieces.size/2) |
|
430 | baseSize += (pieces.size / 2) | |
431 | @base=pieces[0..-baseSize].join(".") |
|
431 | @base = pieces[0..-baseSize].join(".") | |
432 | if baseSize > 2 |
|
432 | if baseSize > 2 | |
433 | @branchid=pieces[-2] |
|
433 | @branchid = pieces[-2] | |
434 | end |
|
434 | end | |
435 | end |
|
435 | end | |
436 | end |
|
436 | end |
General Comments 0
You need to be logged in to leave comments.
Login now