buildbot/buildbot — pull request #1172 by kayhayen (2014-07-04 08:17:27+00:00)
Title: Added support for git step submodules to specify which submodules to che...

This allows to specify which git submodules to checkout and update.

In my setup, large test suites all exist in one repository, which is in turn referenced by other git repositories, causing size and performance issues. Also, on one occasion it happened that one repository got rebased, rendering everything that attempted to check out its parent as a submodule unable to proceed.

With this patch, True and False still work as expected for submodules, but you can also provide a list or tuple with the names. I am using it like this:

factory.addStep(
Git(
repourl='xxxx',
submodules=["nikola", "output", "nuitka/master", "nuitka/develop", "nuitka/factory"],
mode='full',
)
)

Here, the repository is following 3 different branches that each have submodules, with e.g. a GUI, that won't be used.

The recursive flag is turned off.

Missing would be the ability to specify which submodules of submodules to checkout. I don't currently need it, and it might be over the top. It would require parsing prefixes of submodules (and to sort them by length), and then to enter the submodule to do the submodule update/init.

This is not based against master branch, as specifically requested by Dustin, who said that "nine" is not ready for productive testing, and there won't be difficulty in porting it.

I read the patch policy and saw that tests will be required. Let me know, if you agree with the functionality as it is, as that determines the scope.