Re: 3-way merge mode



On 20 September 2012 06:56, Piotr Piastucki <leech miranda gmail com> wrote:
>
>
> On Wed, Sep 19, 2012 at 10:47 PM, Piotr Piastucki <leech miranda gmail com>
> wrote:
>>
>> On Tue, Sep 18, 2012 at 11:02 PM, Kai Willadsen <kai willadsen gmail com>
>> wrote:
>>>
>>>   * The command line invocation seems arcane to me... personally, I'd
>>> never remember the file order. An explicit flag version would be nice,
>>> and I'd feel much better about documenting something like "meld a b c
>>> --output d --auto-merge"; the four-argument version is then just an
>>> alias. This would also clean up some icky code in MeldWindow.
>>>
>>
>> In this particular case I think I can help. Attached is a patch that adds
>> --auto-merge option. Comments and testing welcome.
>>
>> Cheers,
>> Piotr
>>
>
> Actually, I have just noticed filemerge module can be simplified even a bit
> more. Patch attached.

Brilliant, thanks! Those are exactly the kinds of changes I was looking for.

I also suspect that we can do even better. Your set_merge_output()
changes actually look like fixes that could be applied to FileDiff.
Also, it looks to me like we no longer need the hidden buffer. I've
attached the changes; let me know if they look sane.

The manual text and buffer handling in FileMerge._merge_files should
probably be replaced with FileDiff.buffer_texts and
FileDiff.buffer_filtered usage; this should avoid some of the unicode
line-splitting issues we've had over the years.

While a UI would be nice, I think most people will use this feature
from the command-line. With these clean-ups (and a bit of testing) I'm
very happy to advertise this as a feature.

cheers,
Kai

Attachment: 0001-Move-FileMerge-output-redirection-changes-to-FileDif.patch
Description: Binary data

Attachment: 0002-Remove-hidden-textbuffer-usage-from-FileMerge.patch
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]