hook to permit per file merges

Bug #491711 reported by Robert Collins on 2009-12-03
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
High
Andrew Bennetts
Ubuntu Distributed Development
High
Unassigned

Bug Description

bzr-builddeb would benefit from a clear way to do merges to debian/changelog.

There should be a HookPoint related to merges, and it should have a hook in it called on each merge being done; I've sketched this previously on the list I think, but in case I haven't, I think the following constraints are key:
 - multiple plugins should be able to install this hook - it needs to chain
 - a plugin that does the merge should be able to indicate it has done so, and then none of the other hooked plugins would be called. OR, some clean way of letting the later callers know that the merge has been attempted and they shouldn't waste that effort.
 - there may need to be some sort of ordering, e.g. interactive merges may want to always be last, after automated ones

Tags: udd Edit Tag help

Related branches

Changed in udd:
status: New → Confirmed
importance: Undecided → High
Andrew Bennetts (spiv) on 2009-12-03
Changed in bzr:
assignee: nobody → Andrew Bennetts (spiv)
Martin Pool (mbp) on 2009-12-10
Changed in bzr:
status: Confirmed → In Progress
Andrew Bennetts (spiv) wrote :

The linked branch adds a hook that is intended to address this. It doesn't address "there may need to be some sort of ordering, e.g. interactive merges may want to always be last, after automated ones", but maybe that's not necessary initially, although it does sound like a good improvement to do at some stage.

Changed in bzr:
status: In Progress → Fix Committed

On Fri, 2009-12-18 at 08:10 +0000, Andrew Bennetts wrote:
> The linked branch adds a hook that is intended to address this. It
> doesn't address "there may need to be some sort of ordering, e.g.
> interactive merges may want to always be last, after automated ones",
> but maybe that's not necessary initially, although it does sound like a
> good improvement to do at some stage.

BTW - cool... is this still unlanded?

-Rob

John A Meinel (jameinel) wrote :

It hasn't landed yet. I believe the last state was that you could have a custom merger when there was divergence, but not when there was only a change on one side.
Oh, and we were trying to figure out what the appropriate api should look like. (If we were going to allow the transform state to be changed by the hook, then it seemed all the state should have been done in the hook.)

And I think Andrew wanted to see if he could refactor so that even the standard code path went via the hook, to make sure that it was 'powerful enough' sort of thing.

Andrew Bennetts (spiv) wrote :

(We don't use Fix Committed anymore)

Quick update: I've resubmitted the merge proposal, <https://code.edge.launchpad.net/~spiv/bzr/per-file-merge-hook-491711/+merge/17279>, and among other improvements this version includes an example plugin for merging bzr's NEWS file.

Changed in bzr:
status: Fix Committed → In Progress
Vincent Ladeuil (vila) on 2010-01-20
Changed in bzr:
milestone: none → 2.1.0rc1
Vincent Ladeuil (vila) on 2010-01-20
Changed in bzr:
status: In Progress → Fix Released
Andrew Bennetts (spiv) wrote :

bzr-builddeb trunk appears to register a custom merge hook for debian/changelog files now, so is the udd part of this bug Fix Released, or at least In Progress?

James Westby (james-w) wrote :

Good point.

It will be In Progress until it is available in Ubuntu. That will be the end of this week or sometime next.

Thanks

James

Changed in udd:
status: Confirmed → In Progress
Robert Collins (lifeless) wrote :

@james is it available in Ubuntu now?

James Westby (james-w) wrote :

On Wed, 07 Apr 2010 02:08:09 -0000, Robert Collins <email address hidden> wrote:
> @james is it available in Ubuntu now?

Yup.

Thanks,

James

Changed in udd:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers