diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-08-07 12:42:18 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-08-07 12:42:18 +0000 |
commit | d949d5d6f816babd28d51540bffbfaa31f4ee971 (patch) | |
tree | c2f088a25aa0400d4bc5ed3c2be9a00d5a6d8f5e /lib | |
parent | edb54807cae347ba292e933f6c5f5bb0be901e05 (diff) | |
download | redmine-d949d5d6f816babd28d51540bffbfaa31f4ee971.tar.gz redmine-d949d5d6f816babd28d51540bffbfaa31f4ee971.zip |
remove spaces inside {} of lib/redmine/scm/adapters/mercurial_adapter.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@19945 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/scm/adapters/mercurial_adapter.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/redmine/scm/adapters/mercurial_adapter.rb b/lib/redmine/scm/adapters/mercurial_adapter.rb index 6f6b4191a..00c8e3df9 100644 --- a/lib/redmine/scm/adapters/mercurial_adapter.rb +++ b/lib/redmine/scm/adapters/mercurial_adapter.rb @@ -64,7 +64,7 @@ module Redmine end def hgversion_from_command_line - shellout("#{sq_bin} --version") { |io| io.read }.to_s + shellout("#{sq_bin} --version") {|io| io.read}.to_s end def template_path @@ -180,7 +180,7 @@ module Redmine def revisions(path=nil, identifier_from=nil, identifier_to=nil, options={}) revs = Revisions.new - each_revision(path, identifier_from, identifier_to, options) { |e| revs << e } + each_revision(path, identifier_from, identifier_to, options) {|e| revs << e} revs end @@ -243,7 +243,7 @@ module Redmine hg_args << "--from=#{CGI.escape(branch)}" hg_args << '--to=0' hg_args << "--limit=#{options[:limit]}" if options[:limit] - hg(*hg_args) { |io| io.readlines.map { |e| e.chomp } } + hg(*hg_args) {|io| io.readlines.map {|e| e.chomp}} end def diff(path, identifier_from, identifier_to=nil) @@ -311,10 +311,10 @@ module Redmine # Runs 'hg' command with the given args def hg(*args, &block) # as of hg 4.4.1, early parsing of bool options is not terminated at '--' - if args.any? { |s| HG_EARLY_BOOL_ARG.match?(s) } + if args.any? {|s| HG_EARLY_BOOL_ARG.match?(s)} raise HgCommandArgumentError, "malicious command argument detected" end - if args.take_while { |s| s != '--' }.any? { |s| HG_EARLY_LIST_ARG.match?(s) } + if args.take_while {|s| s != '--'}.any? {|s| HG_EARLY_LIST_ARG.match?(s)} raise HgCommandArgumentError, "malicious command argument detected" end @@ -325,7 +325,7 @@ module Redmine full_args << '--config' << 'diff.git=false' full_args += args ret = shellout( - self.class.sq_bin + ' ' + full_args.map { |e| shell_quote e.to_s }.join(' '), + self.class.sq_bin + ' ' + full_args.map {|e| shell_quote e.to_s}.join(' '), &block ) if $? && $?.exitstatus != 0 |