use external diff tool in the ignore line-endings mode for merge

Fredrik Staxeng fstx+u at update.uu.se
Sun Dec 9 10:01:22 UTC 2012


John Arbash Meinel <john at arbash-meinel.com> writes:

>...
>
>> 
>>> The work on this still in progress, but you can use external diff
>>> tool
>> ----------------------------------
>>> (e.g. GNU diff3) in the ignore line-endings mode for merge.
>> -----------------------------------------------------------
>> 
>> https://lists.ubuntu.com/archives/bazaar/2009q1/053994.html
>> 
>
>Offhand, I would guess you would do this by using the .OTHER, .THIS,
>.BASE files that bzr puts in the directory whenever it gets a merge
>conflict. .THIS was the test that existed in the directory before the
>merge, .OTHER was the text we were merging, and .BASE is what bzr
>determined to be the common ancestor.

Whar bazaar does is something roughly equvivalent to 
     diff3 -m file.THIS file.BASE file.OTHER >file 

The cygwin diff3 has an option to strip CR.

>I don't know diff3 syntax very well.

It is a very useful command.

>
>However, I don't think this is something you can just tell bzr to use
>diff3, it is an after-merge-conflict step.

That the conflict occurs is OK. The problem is that the merged file contains

<<<<<<
all of FILE.THIS
======
all of FILE.OTHER
>>>>>>

>Alternatively, bzr does have the ability to have a plugin provide a
>per-file merge hook (which you can say applies to all files).
>
>I don't remember all the syntax for it, but there is:
>  bzrlib/plugins/news_merge/

There is also the Bazaar external merge plugin by Erik Bågfors, which
seems to be dead. 

>Which you can use as an example.
>
>John
>=:->
>

-- 
Fredrik Stax\"ang | rot13: sfgk at hcqngr.hh.fr
This is all you need to know about vi: ESC : q ! RET




More information about the bazaar mailing list