[ANN][PLUGIN] external merge
John A Meinel
john at arbash-meinel.com
Mon Feb 20 15:18:30 GMT 2006
Aaron Bentley wrote:
> Martin Pool wrote:
>>> Perhaps we could have this behaviour builtin as say 'bzr merge
>>> --interactive', or automatically turned on by a user preference? It
>>> could also be called from say 'bzr remerge --interactive'.
>
> It would certainly be possible to implement external merges as a new
> merge type, or maybe a reprocessing step. OTOH, with the API changing
> radically, it may be better to implement them in cmd_merge and cmd_remerge.
>
> Aaron
I think having a plugin provide:
bzr merge --merge-type=xxdiff
Is the best way to do it. We can provide a useful base implementation
for interactive merge types. Something like
InteractiveMerger. So plugin authors have an easier time adding support
for their specific front-end.
And then when we get aliases/defaults into bzr, someone can just say
[ALIASES]
merge=merge --merge-type=xxdiff
Or we could add an option for:
[DEFAULTS]
merge-type = weave
I realize we are switching to TreeTransform, with the only thing holding
it back being my inability to agree to a naming scheme for the
'get_trans_id' functions. I'll reply there to get it done.
We also could change merge-type to support multiple arguments. Something
like:
--merge-type=weave,xxdiff
or
--merge-type=weave+xxdiff
or
--merge-type=weave --conflicts=xxdiff
The nice thing about the --conflicts version, is that it could run a
conflict check after all other merges have been done, rather than doing
it as you go.
But the basic idea is that it could try and do the merge in a
non-interactive form, and if that function does not succeed, then it
tries the next one.
You could even chain them with:
--merge-type=merge3,weave,vimdiff
Which would try plain merge, but if there was a conflict, it would try
weave merge, and if it still couldn't resolve it, it would open vimdiff
and ask you to do it.
The biggest reason I prefer adding a new merge-type is because then both
'bzr remerge' and 'bzr merge' have the option for using the new
functionality.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060220/c2c0ff8c/attachment.pgp
More information about the bazaar
mailing list