hook to permit per file merges

Bug #491711 reported by Robert Collins
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
High
Andrew Bennetts
Ubuntu Distributed Development
Fix Released
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

Related branches

Changed in udd:
status: New → Confirmed
importance: Undecided → High
Andrew Bennetts (spiv)
Changed in bzr:
assignee: nobody → Andrew Bennetts (spiv)
Martin Pool (mbp)
Changed in bzr:
status: Confirmed → In Progress
Revision history for this message
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
Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 491711] Re: hook to permit per file merges

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

Revision history for this message
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.

Revision history for this message
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)
Changed in bzr:
milestone: none → 2.1.0rc1
Vincent Ladeuil (vila)
Changed in bzr:
status: In Progress → Fix Released
Revision history for this message
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?

Revision history for this message
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
Revision history for this message
Robert Collins (lifeless) wrote :

@james is it available in Ubuntu now?

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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