MantisBT - CMake
View Issue Details
0007879CMakepublic2008-10-29 01:462012-02-02 13:39
Emmanuel Christophe 
Brad King 
normalfeatureN/A
closedfixed 
 
 
0007879: Support for mercurial
It would be nice to have a support for mercurial repositories with cdash/ctest.

For cdash, integration with the hgweb interface to navigate in the source is already working if the CVS/SVN ViewerURL is configured as http://repositoryAddress/file/tip/ [^]

The main issue is the retrieval of the correct nightly version by ctest and the correct mercurial output parsing. I'm currently experimenting with cdash/mercurial so I'll probably be able to provide some inputs in the near future.

No tags attached.
child of 0007541new  CDash support modern version-control tools 
patch patch-cdash.patch (1,685) 2008-11-28 00:25
https://public.kitware.com/Bug/file/1877/patch-cdash.patch
gz patch-cmake.patch.gz (8,135) 2008-11-28 00:26
https://public.kitware.com/Bug/file/1878/patch-cmake.patch.gz
patch patch-cmake.patch (35,820) 2009-06-04 21:26
https://public.kitware.com/Bug/file/2302/patch-cmake.patch
gz patch-cdash-2.6.4.patch.gz (652) 2009-06-04 21:28
https://public.kitware.com/Bug/file/2303/patch-cdash-2.6.4.patch.gz
gz patch-cmake-2.6.4.patch.gz (8,108) 2009-06-04 21:29
https://public.kitware.com/Bug/file/2304/patch-cmake-2.6.4.patch.gz
tgz patch-cmake-CVS-after-refactoring-tmp.tgz (7,561) 2009-07-10 05:41
https://public.kitware.com/Bug/file/2361/patch-cmake-CVS-after-refactoring-tmp.tgz
Issue History
2008-10-29 01:46Emmanuel ChristopheNew Issue
2008-11-28 00:25Emmanuel ChristopheFile Added: patch-cdash.patch
2008-11-28 00:26Emmanuel ChristopheFile Added: patch-cmake.patch.gz
2008-11-28 00:28Emmanuel ChristopheNote Added: 0014219
2009-06-04 20:41Sean ChittendenNote Added: 0016643
2009-06-04 21:26Sean ChittendenFile Added: patch-cmake.patch
2009-06-04 21:28Sean ChittendenFile Added: patch-cdash-2.6.4.patch.gz
2009-06-04 21:29Sean ChittendenFile Added: patch-cmake-2.6.4.patch.gz
2009-06-04 21:30Sean ChittendenNote Added: 0016644
2009-06-29 09:47Brad KingRelationship addedchild of 0006994
2009-06-29 09:48Brad KingRelationship deletedchild of 0006994
2009-06-29 09:52Brad KingNote Added: 0016774
2009-06-29 09:52Brad KingRelationship addedrelated to 0006994
2009-07-02 17:44Bart JanssensNote Added: 0016811
2009-07-03 02:33Emmanuel ChristopheNote Added: 0016812
2009-07-03 08:14Brad KingNote Added: 0016813
2009-07-10 05:41Emmanuel ChristopheFile Added: patch-cmake-CVS-after-refactoring-tmp.tgz
2009-07-10 05:45Emmanuel ChristopheNote Added: 0016837
2009-07-10 11:08Brad KingNote Added: 0016840
2009-07-10 11:21Brad KingRelationship addedchild of 0007541
2009-07-10 11:22Brad KingRelationship deletedrelated to 0006994
2009-07-10 11:27Brad KingNote Added: 0016841
2009-12-16 14:31David ColeProjectCDash => CMake
2009-12-16 14:31Brad KingStatusnew => assigned
2009-12-16 14:31Brad KingAssigned To => Brad King
2009-12-16 14:32Brad KingNote Added: 0018929
2009-12-16 14:32Brad KingStatusassigned => closed
2009-12-16 14:32Brad KingResolutionopen => fixed

Notes
(0014219)
Emmanuel Christophe   
2008-11-28 00:28   
Attached is the patch to add the hgweb support into cdash.

It's working well for mercurial if ctest supports it (patch also attached).
(0016643)
Sean Chittenden   
2009-06-04 20:41   
Very nice. Would love to see this support integrated in to the main line for cmake/ctest.
(0016644)
Sean Chittenden   
2009-06-04 21:30   
Updated the patch to 2.6.4 so that the contents of this bug don't get too stale. I updated the patch to be more friendly to patch(1)

gunzip foo.patch.gz
patch -p0 < foo.patch

The updated files for 2.6.4 are:

patch-cdash-2.6.4.patch.gz
patch-cmake-2.6.4.patch.gz
(0016774)
Brad King   
2009-06-29 09:52   
CMake in CVS HEAD has had major refactoring of the CTest update code. See issue 0007541. There is now a class hierarchy that cleanly factors out VCS-specific code. There is already support for CVS, SVN, GIT, and BZR.

Please re-work the CMake part of the patch so it applies to CVS HEAD.
(0016811)
Bart Janssens   
2009-07-02 17:44   
I could try to look into this in the near future. I'll post a message when I start working on it, if anyone else who starts on it can do the same, we avoid double work.
(0016812)
Emmanuel Christophe   
2009-07-03 02:33   
Sorry, I didn't realized that my patch was linked to the wrong project and that my mail to the cmake user list went unnoticed (where there is more explanation about the patch):
http://www.cmake.org/pipermail/cmake/2008-November/025536.html [^]

Looking at the CVS HEAD, it seems that GIT and BZR do not support the nightly option yet. Before reworking on the patch, I would like to know how it will be implemented.

For information, the solution to use the test server to provide the nightly revision number has been working perfectly for us for the past 7 months. It does not involve any modification on the codebase (no tagging, no new branch, etc), just a scrip on the server which could (should?) be integrated with CDash.
(0016813)
Brad King   
2009-07-03 08:14   
I'm sorry I missed the patch the first time.

We haven't decided how to do the nightly option yet. It will probably be based on asking CDash what version to test. There is some on-going work in CDash for giving clients instructions rather than hand-coding scripts on every client.

Meanwhile, I would appreciate a patch for HG support *without* the Nightly option. There is no need to modify CTestTest(s) but there are new CTest.UpdateCVS, CTest.UpdateSVN, CTest.UpdateGIT, and CTest.UpdateBZR tests. The HG support should have a CTest.UpdateHG test following the same layout.

Thanks!
(0016837)
Emmanuel Christophe   
2009-07-10 05:45   
Just attached the patch for mercurial support by cmake. This patch is against CVS version from 20090708.

I also included in the tgz the added files:
cmCTestHG.h
cmCTestHG.cxx
CTestUpdateHG.cmake.in

The patch also add the test for the mercurial repository.

Most of the parsing is done, but the patch is not complete yet. I won't be able to work on it for the next 2 weeks, so it's here in case somebody wants to put the final touch.
(0016840)
Brad King   
2009-07-10 11:08   
Wonderful, that patch got us most of the way. I've gotten things working from there:

ENH: Teach CTest to handle Mercurial repositories
/cvsroot/CMake/CMake/Modules/CTest.cmake,v <-- Modules/CTest.cmake
new revision: 1.18; previous revision: 1.17
/cvsroot/CMake/CMake/Source/CMakeLists.txt,v <-- Source/CMakeLists.txt
new revision: 1.418; previous revision: 1.417
/cvsroot/CMake/CMake/Source/CTest/cmCTestHG.cxx,v <-- Source/CTest/cmCTestHG.cxx
initial revision: 1.1
/cvsroot/CMake/CMake/Source/CTest/cmCTestHG.h,v <-- Source/CTest/cmCTestHG.h
initial revision: 1.1
/cvsroot/CMake/CMake/Source/CTest/cmCTestUpdateCommand.cxx,v <-- Source/CTest/cmCTestUpdateCommand.cxx
new revision: 1.18; previous revision: 1.17
/cvsroot/CMake/CMake/Source/CTest/cmCTestUpdateHandler.cxx,v <-- Source/CTest/cmCTestUpdateHandler.cxx
new revision: 1.67; previous revision: 1.66
/cvsroot/CMake/CMake/Source/CTest/cmCTestUpdateHandler.h,v <-- Source/CTest/cmCTestUpdateHandler.h
new revision: 1.14; previous revision: 1.13
/cvsroot/CMake/CMake/Tests/CMakeLists.txt,v <-- Tests/CMakeLists.txt
new revision: 1.92; previous revision: 1.91
/cvsroot/CMake/CMake/Tests/CTestUpdateHG.cmake.in,v <-- Tests/CTestUpdateHG.cmake.in
initial revision: 1.1
(0016841)
Brad King   
2009-07-10 11:27   
Thank you very much for the patch.

I'm leaving this issue open until the Nightly problem is resolved for all the distributed version control tools.

There is also room for improvement in cmCTestHG::LoadRevisions. I've left a TODO comment for it. The "list of strings" substituted by 'hg log' for {files} is not robust to spaces in file names, and may not have proper XML escaping. I think the log parsing needs to be replaced by something that uses plumbing or direct python code to robustly extract revision information.
(0018929)
Brad King   
2009-12-16 14:32   
CTest 2.8.0 supports Mercurial. See issue 0007541 for updates on the nightly start time issue (which affects all DVCS tools).