Repository improvements (check + update)
Currently Mercurial will not used, if the checkout target directory contains files. This is only a primitive test. This can cause trouble if a previous clone task was aborted.
So here are tasks for the case that the checkout target directory still exists:
\ TODO 1:
Check if repositories are valide. If not, throw an exception. \ The command is "hg verify".
Note: There are upto 4 repositories. The second, third and fourth ones are in subdirectories of the Mogre repository tree. \ So you need to call the hg command in the related directories to get the correct result.
Overview of repository paths: <TargetDirectory> = Mogre repository <TargetDirectory> \ Main \ OgreSrc \ ogre = Ogre repository <TargetDirectory> \ Main \ OgreSrc \ ogre \ Depencies = Ogre depencies repository <TargetDirectory> \ MogreAddons = Add-ons repository (optionally)
\\ TODO 2:
If repositories are valide, check if there are updates available (online). If yes, update the local repositories (and local files).
Nice would be an extra command-line option to prevent repository updates if the user wants to stick on the local one. (The option name could be "-noupdate")
Add the checks to these files: <MogreBuilder_Directory> \ Source \ Tasks \ CloneAddonsRepository.cs <MogreBuilder_Directory> \ Source \ Tasks \ CloneDependenciesRepository.cs <MogreBuilder_Directory> \ Source \ Tasks \ CloneMogreSource.cs <MogreBuilder_Directory> \ Source \ Tasks \ CloneOgreSource.cs
Or write a checker method, which is called from all of these files.