summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-03-22 15:56:41 (GMT)
committerBrad King <brad.king@kitware.com>2012-03-22 15:57:38 (GMT)
commitd0702f8214f261d72c66ac7e400d9af984cd9391 (patch)
treef0f3e23955b99667a016f6f9b2c026bdff632cfc /Tests
parent0916cc888a086293f4c17e9c927f2267e1fdb755 (diff)
downloadCMake-d0702f8214f261d72c66ac7e400d9af984cd9391.zip
CMake-d0702f8214f261d72c66ac7e400d9af984cd9391.tar.gz
CMake-d0702f8214f261d72c66ac7e400d9af984cd9391.tar.bz2
CTest.UpdateHG: Fix repo URL for leading slash
Use "file:///..." instead of "file:////..." when the file system path starts in a slash. Commit 0916cc88 (CTest.UpdateHG: Fix repo URL for local filesystem, 2012-03-02) added a third slash after "file://" unconditionally. This worked for many file systems but not on Cygwin where "file:////cygdrive/..." looks like "file://" followed by a network file path "//cygdrive/...". Add the slash only if the file system path does not already start with one.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CTestUpdateHG.cmake.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/Tests/CTestUpdateHG.cmake.in b/Tests/CTestUpdateHG.cmake.in
index 5a9daae..640d2c6 100644
--- a/Tests/CTestUpdateHG.cmake.in
+++ b/Tests/CTestUpdateHG.cmake.in
@@ -28,7 +28,10 @@ run_child(
WORKING_DIRECTORY ${TOP}/repo.hg
COMMAND ${HG} init
)
-set(REPO file:///${TOP}/repo.hg)
+if(NOT "${TOP}" MATCHES "^/")
+ set(slash /)
+endif()
+set(REPO file://${slash}${TOP}/repo.hg)
#-----------------------------------------------------------------------------
# Import initial content into the repository.