This is enhancement of MercurialBuildInfrastructurePlan and alternative to HgTeamIntegration.
A prototype is running with core-main and the continuous build setup.
HgParallelTeamIntegrationBestPractices
cd /golden-mirror hg pull http://hg.netbeans.org/main-golden rm -rf /team-integration hg clone /golden-mirror /team-integration cd /team-integration hg pull -u http://hg.netbeans.org/team-main HGMERGE=merge hg merge hg megre (*) hg ci -m "Automated merge" hg push http://hg.netbeans.org/team-main (**)
(*) If merge failed send an email to team about conflict between team repo and golden-repo. Team needs to handle this situation manually in one of their working workspaces.
(**) If push fails repeat pull, merge, commit and push round. The number of repeats needs to be specified
cd /team-repo hg pull http://hg.netbeans.org/team-main rm -rf /team-build hg clone /team-repo /team-build cd /team-build hg pull -u http://hg.netbeans.org/main HGMERGE=merge hg merge hg megre (*) hg ci -m "Automated merge" build with tests (**) hg pull -u http://hg.netbeans.org/main hg push http://hg.netbeans.org/main
(*) If merge failed send email to team about conflict between team repo and main. Team needs to handle this situation manually in one of their working workspace
(**) if build or tests fail team is notified about unsuccessful integration with main repository. Team needs to handle this situation manually in one of their working workspace
main-golden repository is being populated by production build.
In any case broken main doesn't prevent teams from work in their private team repositories. They could have their own CB setup too.
There is also option to enhance the second job, so it would look like:
cd /team-repo hg pull -u http://hg.netbeans.org/team-main clean build with test (*) rm -rf /team-build hg clone /team-repo /team-build cd /team-build hg pull -u http://hg.netbeans.org/main HGMERGE=merge hg merge hg megre (**) hg ci -m "Automated merge" build with tests (***) hg pull -u http://hg.netbeans.org/main hg push http://hg.netbeans.org/main
(*) if build fails team is notified about bad situation in their team repository.
(**) If merge failed send email to team about conflict between team repo and main. Team needs to handle this situation manually in one of their working workspace
(***) if build or tests fail team is notified about unsuccessful integration with main repository. Team needs to handle this situation manually in one of their working workspace