Need a vcs-revert option

Bug #1294020 reported by Georges Racinet
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenERP buildout recipe
Fix Committed
Undecided
Unassigned

Bug Description

With the arrival of the merges option, a new 'vcs-revert' is needed. The main use case would be to clean up remnants of previous runs.

This is demonstrated to the current state of the following OCB builder :
http://buildbot.anybox.fr/builders/ocb-7.0-postgresql-9.2/builds/319/steps/buildout/logs/stdio

A first execution of merge-in produces a local modification that's in conflict with a subsequent commit on the same merged in branch (it would not if it had been committed, but that's a different story). Further executions will, repetitely until a manual operator cleans the mess (I think the loop of .moved.moved.moved files is due to #1294014 and is harmless in itself).

A conservative approach would be to have the vcs-revert option been run after the update, before any merge, but we could have several values

vcs-revert = on-merge ; only if there's a merge for this repo, performed at the beginning of the merge
                        before-update
                        after-update ; run in any case right after the updates

etc. For the time being, only the 'on-merge' variant seems to be really needed.

Related branches

Revision history for this message
Georges Racinet (gracinet) wrote :

Another line of thought : since the merge is done by get_update(), triggered by a specific repo option, it (currently) also implements the clear-retry global option, yet exactly in the same way that for a get_update() on the main branch. That is certainly incorrect, since wiping the whole repository to retry a merge makes no sense.

But clear-retry for a merge could instead revert. This would also solve the problems currently demonstrated by the OCB buildbot.
But still it'd make no sense for a scenario with several merges if the last one fails.

Sooo, I've been tempted but the original approach of this issue seems to be the most general one, if not the lightest.
The bzr merge code should ignore clear-retry altogether.

Revision history for this message
Georges Racinet (gracinet) wrote :

General implementation done.
Implementation in the special case of Bzr also done. The recipe will just ignore reverts on non-supported repos.

Changed in anybox.recipe.openerp:
status: New → Fix Committed
milestone: none → 1.9.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.