From 6a77a77a62f6bfb66cea622621d6d1b68e775664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?A=2E=20Jo=C3=ABl=20Lamotte?= Date: Tue, 11 Aug 2015 01:01:25 +0200 Subject: 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. --- Modules/ExternalProject.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) -- cgit v0.12