[Insight-developers] git and dashboard

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Thu Jul 29 14:09:06 EDT 2010


Le 29 juil. 10 à 16:20, Brad King a écrit :

> 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?
>

And what if the repository has been cloned by hand with the default  
branch?
Or if the user has switched to another branch for a quick test and  
forgot to go back to nightly-master?

I understand that it won't fix all the wrong cases, but at least it  
fix the two above - doesn't seem that bad.

Gaëtan



-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.itk.org
http://www.mandriva.org  http://www.bepo.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20100729/919b165b/attachment.pgp>


More information about the Insight-developers mailing list