MantisBT - CMake
View Issue Details
0010484CMakeCTestpublic2010-03-30 05:282011-01-17 16:13
hippo 
Brad King 
normalmajoralways
closedsuspended 
CMake-2-8 
 
0010484: There is no way to run svn/git/hg with custom options like --username.
I have a Subversion repository with authentication.
So I have to pass "--username foo --password bar" to every /usr/bin/svn invocation.

1) The preferred way to do this is to introduce variables like CTEST_SVN_OPTIONS
2) Another way is to make cmCTestVC::CommandLineTool of type std::vector<std::string> instead of std::string, thus allowing CTEST_SVN_COMMAND to be an executable with options like "svn --username foo"
Possible workarounds are:
1) Create custom shell script:
#!/bin/sh
/usr/bin/svn --username foo --password bar $@

2) Run svn manually to cache username and password.
No tags attached.
related to 0011173closed David Cole SVN_USERNAME and SVN_PASSWORD breaks ExternalProject 
related to 0008168closed Brad King CTest retrieval of file versioning history has logic errors 
parent of 0008128closed Brad King ctest cannot handle SVN usernames with spaces 
Issue History
2010-03-30 05:28hippoNew Issue
2010-03-30 05:33hippoNote Added: 0020032
2010-08-25 19:29Hans JohnsonNote Added: 0021967
2010-09-06 08:24hippoNote Added: 0022096
2011-01-17 15:39David ColeAssigned To => Brad King
2011-01-17 15:39David ColeStatusnew => assigned
2011-01-17 15:57Brad KingRelationship addedparent of 0008128
2011-01-17 15:57Brad KingRelationship addedrelated to 0011173
2011-01-17 15:58Brad KingRelationship addedrelated to 0008168
2011-01-17 16:00Brad KingNote Added: 0024810
2011-01-17 16:03Brad KingNote Added: 0024812
2011-01-17 16:13Brad KingNote Added: 0024816
2011-01-17 16:13Brad KingStatusassigned => closed
2011-01-17 16:13Brad KingResolutionopen => suspended

Notes
(0020032)
hippo   
2010-03-30 05:33   
Forgot to mention, that the original problem is that ctest runs "svn log" in cmCTestSVN::LoadRevisions() without any username/password.

Also, the situation with git and mercurial is very similar.
(0021967)
Hans Johnson   
2010-08-25 19:29   
I can not add relationships:


This is related to the closed issue:
http://www.cmake.org/Bug/view.php?id=8128, [^] and this issue should probably also be closed.

===========
The implementation in version 2.8.2 is not quite right though. See response in bug list: http://www.cmake.org/Bug/view. [^]
php?id=11173
(0022096)
hippo   
2010-09-06 08:24   
Well, looks like, it's actually possible to workaround (or solve) the bug via ExternalProject module.
Unfortunately I have no active cmake/ctest project to play with, so I cannot definitely confirm the bug as closed.
(0024810)
Brad King   
2011-01-17 16:00   
The ExternalProject module is used during the build of a project. The issue under discussion here is about getting ctest_update() to checkout/update source trees during dashboard builds.
(0024812)
Brad King   
2011-01-17 16:03   
I think this is an issue only for SVN. Mercurial and Git store the URL and account information in configuration files so that it does not need to be repeated on the command line of "hg pull" or "git fetch".
(0024816)
Brad King   
2011-01-17 16:13   
The value of CTEST_SVN_COMMAND may contain any path, perhaps with spaces, without quoting or escapes. It may be tricky to try to interpret other values from it.

We might need separate CTEST_SVN_USERNAME and CTEST_SVN_PASSWORD options.

Since the original submitter is no longer interested I'm closing this as "suspended". Please re-open if interest is renewed.