scm: cvs: code clean up lib/redmine/scm/adapters/cvs_adapter.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5377 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
18431d3681
commit
740051b769
|
@ -393,20 +393,20 @@ module Redmine
|
||||||
def isBranchRevision
|
def isBranchRevision
|
||||||
!@branchid.nil?
|
!@branchid.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
def prevRev
|
def prevRev
|
||||||
unless @revision==0
|
unless @revision == 0
|
||||||
return buildRevision(@revision-1)
|
return buildRevision( @revision - 1 )
|
||||||
end
|
end
|
||||||
return buildRevision(@revision)
|
return buildRevision( @revision )
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_in_branch_with_symbol(branch_symbol)
|
def is_in_branch_with_symbol(branch_symbol)
|
||||||
bpieces=branch_symbol.split(".")
|
bpieces = branch_symbol.split(".")
|
||||||
branch_start="#{bpieces[0..-3].join(".")}.#{bpieces[-1]}"
|
branch_start = "#{bpieces[0..-3].join(".")}.#{bpieces[-1]}"
|
||||||
return (branchVersion==branch_start)
|
return ( branchVersion == branch_start )
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
def buildRevision(rev)
|
def buildRevision(rev)
|
||||||
if rev== 0
|
if rev== 0
|
||||||
|
@ -421,16 +421,16 @@ module Redmine
|
||||||
@base+"."+@branchid+"."+rev.to_s
|
@base+"."+@branchid+"."+rev.to_s
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Interpretiert die cvs revisionsnummern wie z.b. 1.14 oder 1.3.0.15
|
# Interpretiert die cvs revisionsnummern wie z.b. 1.14 oder 1.3.0.15
|
||||||
def parseRevision()
|
def parseRevision()
|
||||||
pieces=@complete_rev.split(".")
|
pieces = @complete_rev.split(".")
|
||||||
@revision=pieces.last.to_i
|
@revision = pieces.last.to_i
|
||||||
baseSize=1
|
baseSize = 1
|
||||||
baseSize+=(pieces.size/2)
|
baseSize += (pieces.size / 2)
|
||||||
@base=pieces[0..-baseSize].join(".")
|
@base = pieces[0..-baseSize].join(".")
|
||||||
if baseSize > 2
|
if baseSize > 2
|
||||||
@branchid=pieces[-2]
|
@branchid = pieces[-2]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue