[cmake-developers] [PATCH] Handling HG Branches and Path Filtering

Ray, Seoras Seoras-Ray at idexx.com
Fri Apr 3 09:16:24 EDT 2015


Thanks for the feedback! I'll work on the changes and the test and resubmit.

Seoras.
________________________________________
From: Brad King [brad.king at kitware.com]
Sent: Friday, April 03, 2015 8:53 AM
To: Ray, Seoras
Cc: cmake-developers at cmake.org
Subject: Re: [cmake-developers] [PATCH] Handling HG Branches and Path Filtering

On 04/02/2015 05:19 PM, Ray, Seoras wrote:
>  * CTEST_VC_MODULE_PATH: Optional path to filter modified files by.
>  * CTEST_HG_LOG_BRANCH: Branch name to restrict hg log output to.
>                         If not set this defaults to 'default'.

Thanks for working on this.  I think both features are worthwhile.
Here are some comments on the work so far.

The name "VC" in "cmCTestGlobalVC.cxx" is purely internal.  We
should not use it in the public interface because "VC" is too
easily confused with "Visual C++".  Instead we use the prefix
"CTEST_UPDATE_" for variables affecting the ctest_update()
command in general, e.g. CTEST_UPDATE_{COMMAND,OPTIONS}.  Also,
the name "module" is not very clear IMO because CMake uses that
name for other purposes.  We actually just want to filter the
set of reported paths.  Perhaps: CTEST_UPDATE_FILTER_REGEX?

In cmCTestGlobalVC::DoRevision you should be able to change
from strncmp to using cmsys::RegularExpression to perform the
filtering.  The regex can probably be pre-compiled by looking
up the option in the cmCTestGlobalVC constructor and storing
the regex in a member variable.

Also please look at updating the test suite to cover this.
See Tests/CTestUpdateHG.cmake.in for the current HG test.

Thanks,
-Brad



More information about the cmake-developers mailing list