scm: bazaar: code clean up adapter.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5545 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-04-24 09:55:51 +00:00
parent fb9fed39fe
commit 92023176b8
1 changed files with 3 additions and 4 deletions

View File

@ -82,8 +82,8 @@ module Redmine
path ||= '' path ||= ''
entries = Entries.new entries = Entries.new
cmd = "#{self.class.sq_bin} ls -v --show-ids" cmd = "#{self.class.sq_bin} ls -v --show-ids"
identifier = -1 unless identifier && identifier.to_i > 0 identifier = -1 unless identifier && identifier.to_i > 0
cmd << " -r#{identifier.to_i}" cmd << " -r#{identifier.to_i}"
cmd << " #{target(path)}" cmd << " #{target(path)}"
shellout(cmd) do |io| shellout(cmd) do |io|
prefix = "#{url}/#{path}".gsub('\\', '/') prefix = "#{url}/#{path}".gsub('\\', '/')
@ -120,7 +120,6 @@ module Redmine
parsing = nil parsing = nil
else else
next unless revision next unless revision
if line =~ /^revno: (\d+)($|\s\[merge\]$)/ if line =~ /^revno: (\d+)($|\s\[merge\]$)/
revision.identifier = $1.to_i revision.identifier = $1.to_i
elsif line =~ /^committer: (.+)$/ elsif line =~ /^committer: (.+)$/
@ -168,7 +167,7 @@ module Redmine
def diff(path, identifier_from, identifier_to=nil) def diff(path, identifier_from, identifier_to=nil)
path ||= '' path ||= ''
if identifier_to if identifier_to
identifier_to = identifier_to.to_i identifier_to = identifier_to.to_i
else else
identifier_to = identifier_from.to_i - 1 identifier_to = identifier_from.to_i - 1
end end