scm: space cleanup of lib/redmine/scm/adapters/abstract_adapter.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4861 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
49fde3723b
commit
2ddd6e2252
|
@ -19,10 +19,10 @@ require 'cgi'
|
||||||
|
|
||||||
module Redmine
|
module Redmine
|
||||||
module Scm
|
module Scm
|
||||||
module Adapters
|
module Adapters
|
||||||
class CommandFailed < StandardError #:nodoc:
|
class CommandFailed < StandardError #:nodoc:
|
||||||
end
|
end
|
||||||
|
|
||||||
class AbstractAdapter #:nodoc:
|
class AbstractAdapter #:nodoc:
|
||||||
class << self
|
class << self
|
||||||
def client_command
|
def client_command
|
||||||
|
@ -188,11 +188,11 @@ module Redmine
|
||||||
def shellout(cmd, &block)
|
def shellout(cmd, &block)
|
||||||
self.class.shellout(cmd, &block)
|
self.class.shellout(cmd, &block)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.logger
|
def self.logger
|
||||||
RAILS_DEFAULT_LOGGER
|
RAILS_DEFAULT_LOGGER
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.shellout(cmd, &block)
|
def self.shellout(cmd, &block)
|
||||||
logger.debug "Shelling out: #{strip_credential(cmd)}" if logger && logger.debug?
|
logger.debug "Shelling out: #{strip_credential(cmd)}" if logger && logger.debug?
|
||||||
if Rails.env == 'development'
|
if Rails.env == 'development'
|
||||||
|
@ -210,8 +210,8 @@ module Redmine
|
||||||
logger.error("SCM command failed, make sure that your SCM binary (eg. svn) is in PATH (#{ENV['PATH']}): #{strip_credential(cmd)}\n with: #{msg}")
|
logger.error("SCM command failed, make sure that your SCM binary (eg. svn) is in PATH (#{ENV['PATH']}): #{strip_credential(cmd)}\n with: #{msg}")
|
||||||
raise CommandFailed.new(msg)
|
raise CommandFailed.new(msg)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Hides username/password in a given command
|
# Hides username/password in a given command
|
||||||
def self.strip_credential(cmd)
|
def self.strip_credential(cmd)
|
||||||
q = (Redmine::Platform.mswin? ? '"' : "'")
|
q = (Redmine::Platform.mswin? ? '"' : "'")
|
||||||
|
@ -231,7 +231,7 @@ module Redmine
|
||||||
else
|
else
|
||||||
x.kind <=> y.kind
|
x.kind <=> y.kind
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def revisions
|
def revisions
|
||||||
|
@ -329,7 +329,7 @@ module Redmine
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class Annotate
|
class Annotate
|
||||||
attr_reader :lines, :revisions
|
attr_reader :lines, :revisions
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue