[Insight-developers] git and dashboard

Brad King brad.king at kitware.com
Thu Jul 29 10:20:36 EDT 2010


On 07/29/2010 09:50 AM, Gaëtan Lehmann wrote:
>> If you use the default Nightly mode it will select nightly-master
>> automatically when it does the *initial* clone command.  If you just
>> delete your source tree the script will set it up correctly on the
>> next run.  After that it trusts that the local user has done what
>> he pleases.
> 
> IMO it would be safer to enforce the right branch.

If itk_common does the initial clone then you get the right branch.

> If it's not done there, I'll do it outside, but I think it shouldn't
> be done only in my builds :-)

This is tricky to implement.  The commands to switch to the proper
branch depend on the starting state of the local repository.  Does
the branch already exist locally?  Does it already track the upstream
branch?  What if we are on another branch and there are local
modifications (git will refuse to switch branches)?

If users just start with a clean directory (no source tree) and
follow the script's instructions then everything is setup right.
The way to reset to the script's defaults is "rm -rf ITK".

> I believe a hook like that should be ok:
>
>    macro(dashboard_hook_init)
>      execute_process(
>        COMMAND "${CTEST_GIT_COMMAND}" checkout nightly-master
>        WORKING_DIRECTORY "${CTEST_SOURCE_DIRECTORY}"
>        )
>    endmacro(dashboard_hook_init)

What if the local tracking branch has not been set up?

-Brad


More information about the Insight-developers mailing list