diff options
author | A. Joël Lamotte <mjklaim@gmail.com> | 2015-08-10 23:01:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-08-11 13:25:31 (GMT) |
commit | 6a77a77a62f6bfb66cea622621d6d1b68e775664 (patch) | |
tree | 7a59d14b87417c76b0ee72ccc69da0cb878dcf71 /Modules/ExternalProject.cmake | |
parent | 422d3f68de6bfa5c3fad68d2b030f2a618a821a2 (diff) | |
download | CMake-6a77a77a62f6bfb66cea622621d6d1b68e775664.zip CMake-6a77a77a62f6bfb66cea622621d6d1b68e775664.tar.gz CMake-6a77a77a62f6bfb66cea622621d6d1b68e775664.tar.bz2 |
ExternalProject: Tell "hg clone" not to implicitly update
By default Mercurial command "clone" will implicitly call "update" with
the "default" branch after downloading the cloned repository. However
ExternalProject_Add() always generates a second "update" command after
cloning with a tag which is either specified or "tip" (equivalent to
"default" by default). Therefore ExternalProject will first clone then
update to default branch then update to another specified branch if
provided. This leads to potentially very long clone operation (in
particular when the repository default branch contain subrepos) which
can lead to transaction abort triggered by the server.
Simply use "hg clone -U" to avoid the implicit update during clone.
Our following call to "hg update" will take care of updating anyway.
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r-- | Modules/ExternalProject.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index fdb146a..0fbf7c3 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -609,7 +609,7 @@ if(error_code) endif() execute_process( - COMMAND \"${hg_EXECUTABLE}\" clone \"${hg_repository}\" \"${src_name}\" + COMMAND \"${hg_EXECUTABLE}\" clone -U \"${hg_repository}\" \"${src_name}\" WORKING_DIRECTORY \"${work_dir}\" RESULT_VARIABLE error_code ) |