[swift-dev] Mult-repo management utilitiy

Joe DeCapo snoogansbc at gmail.com
Mon Nov 27 14:49:20 CST 2017

Hello Swift devs-

A few years ago I started a personal project for managing multiple git repositories. After adopting git submodules at work, I pretty quickly became aware of the numerous issues with submodules. Around that time I was playing around with building Android from source, and really liked the approach Google's `repo` tool took toward mult-repo management. However, `repo` is very closely tied into Google's development workflow with Gerrit, so I decided to write my own tool that fit more closely into GitHub's workflow.

clowder project: https://github.com/JrGoodle/clowder
docs: http://clowder.readthedocs.io/en/latest/

I've used `clowder` for a couple years now at my job for managing our multi-repo setup, both during development and for our Jenkins builds. Initially my examples were based on LLVM, but I realized recently that it could handle most of the tasks Swift's `update_checkout.py` is responsible for. I've been working to add most of the missing functionality, and now am handling some edge cases I was missing that the Swift script called out. I refactored the code to use Cement for the cli portion, so it now supports third party plug-ins in addition to all the built in commands.

I'm not sure if the long-term goal is to use SwiftPM for managing all the various Swift repos, or if separate scripts will always be relied upon for handling those tasks. But if anyone is interested in trying it out, I think it should work today as a drop-in replacement for `update_checkout.py` for most development tasks (the main remaining CI task is checking out branches based on GitHub issues, which is something that I think would be best accomplished via a plug-in). The docs contain a few examples comparing `clowder` to the current `update_checkout.py` script and config files.

Comparisons to Swift scripts: http://clowder.readthedocs.io/en/latest/comparisons.html
Example config file: https://github.com/JrGoodle/swift-clowder/blob/master/clowder.yaml

If anyone is curious and wants to try it out, I would love to hear any feedback. I don't really consider myself a Python developer, so any contributions would be more than welcome (I would have loved to use Swift to write it, but the Swift CLI libraries just aren't as mature as Python's). I've spent a lot of time on this tool and am hoping others might find it useful.


More information about the swift-dev mailing list