lp:~rom1-chal/bzr-builder/merge-all-what-can-be

Created by Romain Chalumeau on 2010-09-20 and last modified on 2010-09-20

As a release manager, I use bzr-builder from a cron robot that merges all the candidate branches for a defined release. I can have many branches to be integrated in a target branch from many developers and the nightly build helps me in reducing the integration phase by sending to concerned developers the conflicts as soon as detected.

The builder stops at the first encountered conflict so it can prevent from getting the potential impacts between the candidate branches, abolve all if the developer is not present to correct it.

So i hacked the builder to have the --merge-what-can-be option :
If a conflict is raised during a merge, with such an option set, it reports the conflict, reverts the changes and goes on with the other instructions.

I also modified the reporting to have a nicely rendered ReST reporting used to add to an email (after a docutils transformation to html) or save in a directory.

To be fixed :
 - The code does not include unit tests. I have used manually done tests to improve it...
- Only the text conflicts have been tested in conflicts raised.
- Did not implement the nest part conflicts
- Did not implement a report on command instruction.

Today, i use this beta code on one production project.

The generated report is :

------------
Build report
------------

Build of branch mel:melanie_test/builder/intg from recipe ``recipe``

+--------+--------------------------------+-------+-------------------------------------------------------------------------------------+
| Status | Branch | Revno | Message |
+========+================================+=======+=====================================================================================+
| OK | mel:melanie_test/builder/intg | 1 | None has been retrieved. |
+--------+--------------------------------+-------+-------------------------------------------------------------------------------------+
| OK | mel:melanie_test/builder/test2 | 2 | branch2 is already merged in mel:melanie_test/builder/intg. |
+--------+--------------------------------+-------+-------------------------------------------------------------------------------------+
| NOK | mel:melanie_test/builder/test1 | 3 | Conflicts have been detected while merging branch1 in mel:melanie_test/builder/intg |
+--------+--------------------------------+-------+-------------------------------------------------------------------------------------+
| | ``toto`` (modifications from rchalumeau@echo.fr, toto@tutu.com) |
+--------+--------------------------------+-------+-------------------------------------------------------------------------------------+
| OK | mel:melanie_test/builder/test3 | 2 | branch3 has been merged in mel:melanie_test/builder/intg and committed |
+--------+--------------------------------+-------+-------------------------------------------------------------------------------------+
| OK | mel:melanie_test/builder/test4 | 3 | branch4 is already merged in mel:melanie_test/builder/intg. |
+--------+--------------------------------+-------+-------------------------------------------------------------------------------------+

Get this branch:
bzr branch lp:~rom1-chal/bzr-builder/merge-all-what-can-be
Only Romain Chalumeau can upload to this branch. If you are Romain Chalumeau please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Romain Chalumeau
Project:
bzr-builder
Status:
Experimental

Recent revisions

108. By Romain Chalumeau on 2010-09-20

removing test dop_cmds call

107. By Romain Chalumeau on 2010-09-20

* Report ing in a different module
* report argument added to RecipeBranch
* ReST formatted report

106. By Romain Chalumeau on 2010-09-16

* Implementation of merge-what-can-be to merge as many branches from the recipe as possible. When a conflict is raised, it reports it and revert the merge to continue on the next recipe order.
* Actions reported in a global dict to generate a ReST report

105. By James Westby on 2010-08-31

Undo the mistaken changes in the previous merge. Thanks Aaron.

104. By James Westby on 2010-08-26

Merge --safe option. Thanks Aaron.

103. By James Westby on 2010-08-16

Bump version for release.

102. By James Westby on 2010-08-16

Merge the 0.3 branch.

101. By James Westby on 2010-08-16

Support older bzr in nest-part. Thanks Andrew.

100. By James Westby on 2010-08-16

Tweak the plugin help text. Thanks Andrew.

99. By James Westby on 2010-08-12

Fixes for the nest-part instruction. Thanks Andrew.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:bzr-builder
This branch contains Public information 
Everyone can see this information.

Subscribers