def action_sync
assert_target_directory_valid!
if ::File.exist?(::File.join(@new_resource.destination, ".svn"))
current_rev = find_current_revision
Chef::Log.debug "#{@new_resource} current revision: #{current_rev} target revision: #{revision_int}"
unless current_revision_matches_target_revision?
converge_by("sync #{@new_resource.destination} from #{@new_resource.repository}") do
run_command(run_options(:command => sync_command))
Chef::Log.info "#{@new_resource} updated to revision: #{revision_int}"
end
end
else
action_checkout
end
end