Re: 3-way merge mode



Hi,

Here's the syntax used by diffmerge tool for Mac:

diffmerge --merge --result=$MERGED $LOCAL $BASE $REMOTE

It's not too far away from meld's --output=$MERGED but it's not clear
what does the --output parameter it do, especially when you run a
2-way diff or directory compare with --output. There are many
writeable files there

What if passing in --output parameter was only possible with 3-way
file comparison and it was the trigger for auto-merge mode? This is
what I'm thinking of:

meld -$LOCAL $BASE $REMOTE -- regular 3-way file compare
meld --output=$MERGED $LOCAL $BASE $REMOTE -- auto-merge mode

Passing --output in any other use scenario would be illegal. This way
it becomes clear what gets saved to --output file because there's just
one writeable file in auto-merge mode. Also with multiple tabs you'd
need multiple --output parameters, one per tab.

Did I get it right or is there something else the --output does?

Cheers,
Tomek

On 18 September 2012 22:02, Kai Willadsen <kai willadsen gmail com> wrote:
> On 17 September 2012 23:02, Tomek Bury <tomek bury gmail com> wrote:
>> Hi,
>>
>> Meld has got a very nice 3-way merge mode. It's activated when the 4th
>> file name is passed in. In git-speak it looks like this:
>>
>> meld $LOCAL $BASE $REMOTE $MERGED
>>
>> Is there any reason why this mode is not advertised on you web site,
>> missing from the man page and "meld --help"?
>
> Not really, sort of and kinda, in that order.
>
> Auto-merge mode was added by Piotr Piastucki a while back, and it
> filled an important hole in Meld's functionality. The main reason that
> it's not properly advertised is that it's not *quite* finished. By
> that, I mean that while it works --- and works well! --- it has some
> usability issues and could be better integrated into the existing
> code-base. Of course, none of this is a criticism of Piotr's work,
> which is awesome and very much appreciated. It's just that it's a lot
> of work to integrate a new feature into an old code base.
>
> I'd love merge mode to become a first-class citizen, so here is a
> short (and probably incomplete) list of things-that-want-fixing:
>
>  * The UI code for merge mode (in filemerge.py) is *tiny*, but works
> by digging into some internals of FileDiff, which has caused issues in
> the past. Can this be cleaned up and integrated better? (e.g., since
> this was written, Meld gained support for an 'out file'... can we
> replace some of the buffer-shuffling with that?)
>
>  * 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.
>
>  * There is no GUI way of starting a merge. This is hard, since the
> "New comparison" dialog has been up for replacement for a *long time*.
> The easiest way to proceed here would probably be a "New auto-merge"
> menu entry or something, side-stepping the problem.
>
> If anyone wants to try and make this happen, please let me know! I'm
> very happy to guide people around the code base and help out where I
> can... I'm just probably not going to have time to do them myself.
>
> cheers,
> Kai


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