For most open source projects, integration of patches provided by willing users if not an easy task and it often falls behind. The burden of patches is both on the user himself and on the project member doing the integration.
Generating a patch is not straightforward for the user (he needs to compare with the original version if he still has it) and worst, he doesn’t get the benefits of version control systems.
On the other side, the project member integrating the patch has to find the correct version against which the patch applies, he has to fight with the line breaks if the patch was submitted by email.
The more obvious solution is to give access to the version control system to the potential contributors: this way, they can fully contribute and the integration is easy. But that raises another question: do you really want anybody to be able to put his/her contribution without any check? Sometimes, the contribution could break another capabilities, sometimes a different solution to fix the problem might be more appropriate, sometimes, this is not the time to integrate risky modifications… That the case why in most open source projects, the core team of people with commit access is limited.
With the availability of distributed VCS (mercurial, git, bazar), part of this problem disappear: the user can work locally and benefit from the VCS, it also makes the patch generation easier. But there is still the problem of sharing. The main argument of the DVCS is that a contributor can go out and say “hey guys, here is my cool version, come and pull from it”, but that involve him setting up a public repository. Unlikely if he is just interested in using the program and on his way fixed a bug.
To make this process easier, we’ve just created a “sandbox” repository for OTB which works as a testing environment that isolates untested code changes and outright experimentation from the production environment or repository. Here is how it works:
- Clone the main OTB repository:
hg clone http://hg.orfeo-toolbox.org/OTB
as normal
- Set up your mercurial identity, in Linux, edit the ~/.hgrc and put the following lines:
[ui] username = Your Name <email-where-we-can@contact.you>
- work as usual, commit locally as you would do for your own project
- when you are happy, push to the sandbox
hg push http://hg.orfeo-toolbox.org/OTB-SandBox
If necessary, use the -f option (we will sort out the mess). When ask for the login use “anonymous” with the password “otb”.
- We will be informed that something new is in the sandbox, but you can also drop a mail at otb-users@googlegroups.com to provide more explanations.
- We will then review the corrections, test them and then merge them into the main repository.
This way, the fix, the new capability, etc will be maintain in the upcoming version of OTB. And also, the user will have the chance to appear in our latest codeswarm.