summaryrefslogtreecommitdiff
path: root/lib/chef/provider/subversion.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/provider/subversion.rb')
-rw-r--r--lib/chef/provider/subversion.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/chef/provider/subversion.rb b/lib/chef/provider/subversion.rb
index 580c879c97..d28bb3c53a 100644
--- a/lib/chef/provider/subversion.rb
+++ b/lib/chef/provider/subversion.rb
@@ -137,6 +137,7 @@ class Chef
def find_current_revision
return nil unless ::File.exist?(::File.join(new_resource.destination, ".svn"))
+
command = scm(:info)
svn_info = shell_out!(command, run_options(cwd: cwd, returns: [0, 1])).stdout
@@ -175,6 +176,7 @@ class Chef
rev = (repo_attrs["Last Changed Rev"] || repo_attrs["Revision"])
rev.strip! if rev
raise "Could not parse `svn info` data: #{svn_info}" if repo_attrs.empty?
+
logger.trace "#{new_resource} resolved revision #{new_resource.revision} to #{rev}"
rev
end
@@ -185,6 +187,7 @@ class Chef
# and will respond appropriately.
def authentication
return "" unless new_resource.svn_username
+
result = "--username #{new_resource.svn_username} "
result << "--password #{new_resource.svn_password} "
result