Commit b1c2cb04 authored by rbprogrammer's avatar rbprogrammer Committed by Brad King
Browse files

ExternalProject: Make SVN interactive with USES_TERMINAL_{DOWNLOAD,UPDATE}

ExternalProject_Add() supports USES_TERMINAL_* flags to enable user
input for different steps.  The Subversion download options ignored
these flags when checking out or updated a Subversion repo.

Fixes: #23348
parent 7dc58249
Pipeline #280815 waiting for manual action with stages
in 17 minutes and 1 second
......@@ -78,6 +78,7 @@ The following individuals and institutions are among the Contributors:
* Michael Hirsch, Ph.D. <www.scivision.co>
* Michael Stürmer
* Miguel A. Figueroa-Villanueva
* Mike Durso <rbprogrammer@gmail.com>
* Mike Jackson
* Mike McQuaid <mike@mikemcquaid.com>
* Nicolas Bock <nicolasbock@gmail.com>
......
......@@ -2530,6 +2530,12 @@ function(_ep_add_download_command name)
get_property(svn_username TARGET ${name} PROPERTY _EP_SVN_USERNAME)
get_property(svn_password TARGET ${name} PROPERTY _EP_SVN_PASSWORD)
get_property(svn_trust_cert TARGET ${name} PROPERTY _EP_SVN_TRUST_CERT)
get_property(uses_terminal TARGET ${name} PROPERTY _EP_USES_TERMINAL_DOWNLOAD)
if(uses_terminal)
set(svn_interactive_args "")
else()
set(svn_interactive_args "--non-interactive")
endif()
get_filename_component(src_name "${source_dir}" NAME)
get_filename_component(work_dir "${source_dir}" PATH)
......@@ -2545,7 +2551,8 @@ function(_ep_add_download_command name)
set(svn_trust_cert_args --trust-server-cert)
endif()
set(cmd ${Subversion_SVN_EXECUTABLE} co ${svn_repository} ${svn_revision}
--non-interactive ${svn_trust_cert_args} ${svn_user_pw_args} ${src_name})
${svn_interactive_args} ${svn_trust_cert_args} ${svn_user_pw_args}
${src_name})
elseif(git_repository)
set(method git)
......@@ -2934,6 +2941,12 @@ function(_ep_add_update_command name)
get_property(svn_username TARGET ${name} PROPERTY _EP_SVN_USERNAME)
get_property(svn_password TARGET ${name} PROPERTY _EP_SVN_PASSWORD)
get_property(svn_trust_cert TARGET ${name} PROPERTY _EP_SVN_TRUST_CERT)
get_property(uses_terminal TARGET ${name} PROPERTY _EP_USES_TERMINAL_UPDATE)
if(uses_terminal)
set(svn_interactive_args "")
else()
set(svn_interactive_args "--non-interactive")
endif()
set(svn_user_pw_args "")
if(DEFINED svn_username)
set(svn_user_pw_args ${svn_user_pw_args} "--username=${svn_username}")
......@@ -2945,7 +2958,7 @@ function(_ep_add_update_command name)
set(svn_trust_cert_args --trust-server-cert)
endif()
set(cmd ${Subversion_SVN_EXECUTABLE} up ${svn_revision}
--non-interactive ${svn_trust_cert_args} ${svn_user_pw_args})
${svn_interactive_args} ${svn_trust_cert_args} ${svn_user_pw_args})
set(always 1)
elseif(git_repository)
# FetchContent gives us these directly, so don't try to recompute them
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment