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