Temporary merges

During development, it can be useful to merge pending pull requests in the various projects used by the project. The buildout recipe supports this through the merges option. Suppose your project uses OCA/partner-contact and OCA/product-attribute, and you need to merge the PR 237 and 249 on partner-contact and the PR 132 on product attribute, then you can write the following in your buildout configuration file:

[odoo] 
OCA = https://github.com/OCA 
version = git https://github.com/odoo/odoo.git odoo 11.0 depth=1 
addons = git ${odoo:OCA}/partner-contact.git parts/partner-contact 11.0 
    git ${odoo:OCA}/product-attribute.git parts/product-attribute  11.0 
    merges = git origin parts/partner-contact pull/237/head 
    git origin parts/partner-contact pull/249/head 
    git origin parts/product-attribute pull/132/head 

The syntax for the merge option using the git protocol is <remote> <local repository> <refspec>. We use here the reference for pull requests provided by GitHub.

A word of caution
This feature is very useful during development but should be avoided for deployment in production. The merged branches can evolve and be rebased or overwritten without notice. It is better that your deployment depends on non-merged PR so as to use a personal fork of the project on which you will do the merges yourself to ensure that you get repeatable builds. Also, note that the buildout freeze-to option, which is explained next, does not work with merges.