From: Toshi MARUYAMA Date: Thu, 9 Jul 2020 15:18:31 +0000 (+0000) Subject: add empty lines after guard clause to lib/redmine/scm/adapters/bazaar_adapter.rb X-Git-Tag: 4.2.0~924 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2f23b63a2188e6e719ca18acbbccd6e7f32817be;p=redmine.git add empty lines after guard clause to lib/redmine/scm/adapters/bazaar_adapter.rb git-svn-id: http://svn.redmine.org/redmine/trunk@19873 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/scm/adapters/bazaar_adapter.rb b/lib/redmine/scm/adapters/bazaar_adapter.rb index 90ba8a7bf..30a3d2a69 100644 --- a/lib/redmine/scm/adapters/bazaar_adapter.rb +++ b/lib/redmine/scm/adapters/bazaar_adapter.rb @@ -102,6 +102,7 @@ module Redmine re = %r{^V\s+(#{Regexp.escape(prefix)})?(\/?)([^\/]+)(\/?)\s+(\S+)\r?$} io.each_line do |line| next unless line =~ re + name_locale, slash, revision = $3.strip, $4, $5.strip name = scm_iconv('UTF-8', @path_encoding, name_locale) entries << Entry.new({:name => name, @@ -138,6 +139,7 @@ module Redmine parsing = nil else next unless revision + if line =~ /^revno: (\d+)($|\s\[merge\]$)/ revision.identifier = $1.to_i elsif line =~ /^committer: (.+)$/ @@ -233,6 +235,7 @@ module Redmine identifier = nil io.each_line do |line| next unless line =~ %r{^(\d+) ([^|]+)\| (.*)$} + rev = $1 blame.add_line($3.rstrip, Revision.new( @@ -249,6 +252,7 @@ module Redmine def self.branch_conf_path(path) return if path.nil? + m = path.match(%r{^(.*[/\\])\.bzr.*$}) bcp = (m ? m[1] : path).gsub(%r{[\/\\]$}, "") File.join(bcp, ".bzr", "branch", "branch.conf") @@ -256,6 +260,7 @@ module Redmine def append_revisions_only return @aro unless @aro.nil? + @aro = false bcp = self.class.branch_conf_path(url) if bcp && File.exist?(bcp) @@ -301,6 +306,7 @@ module Redmine if $? && $?.exitstatus != 0 raise ScmCommandAborted, "bzr exited with non-zero status: #{$?.exitstatus}" end + ret end private :scm_cmd