want a hook for diverged graphs
Bug #496764 reported by
Martin Pool
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned |
Bug Description
It would be nice to have a hook that fires when a push/pull/fetch is about to fail because of diverged graphs. The hook should be given a chance to make some correction. This could be used to make branches cleanly switch across when one of them has been rebased/rewritten.
This may need more discussion before implementation.
See thread "Rewriting Ubuntu branches" on udd.
To start with this should be easy: just fire the hook at the point where we would otherwise raise the 'unrelated branches' exception.
The slightly more subtle bit is what the caller should be able to do before we fire, and then that can let us continue.
igc asks: perhaps we should just add a general "an exception is about to happen" hook?