I'm writing an application and a set of many small plugins—where “many” means dozens and “small” means one or two sources. It's not necessarily going to be possible to divide the plugins into neat, non-overlapping categories. Which would be the best strategy for source control:

  • Many repositories, one for each plugin; or

  • One repository, with a directory for each plugin?

Other suggestions are of course welcome. I'm using Mercurial and hosting on Bitbucket.

2 Answers 2


Is there a same team who maintains all the plugins? Are all the plugins maintained regularly?

I would use one repository per plugin, and use a single repository for all plugins only if there are serious reasons to do so. In fact:

  • Security management on directories of a single repository may be either complicated, or impossible. (I don't know what is the case with Mercurial, so maybe this point is invalid for you)

  • If there are several teams which work on different plugins, mixing them in a same repository would not be a good idea.

  • What if you want to open source one of the plugins? Having a separate repository would be easier than extracting a directory from a large repository.

  • If there are many abandoned plugins, you don't want to pollute your repository with them. If they are in a separate repository, you just forget about them, and that's all.

  • When a fresh developer wants to start working on a plugin, it's much faster to get the source of one plugin from the repository, compared to the time required to load the whole codebase containing thousands and thousands of lines of code.


'Dozens' of components isn't that many really. I've had projects with hundreds.

Since there isn't a convenient way to sort these plug-ins into groups, just use one repo to rule them all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.