Re: Automatically execute "Changes->Merge all non-conflicting" on startup



On Sun, Feb 24, 2013 at 10:05 PM, Kai Willadsen <kai willadsen gmail com> wrote:
On 23 February 2013 18:40, Angel Ezquerra <angel ezquerra gmail com> wrote:
Hi,

I contribute to the mercurial project from time to time. Because of that I
follow the mercurial mailing list. Recently there has been a thread
discussing ways to improve the meld configuration that ships with mercurial.

The main issue is with the merge mode configuration. Currently we use the
following command line :

meld --label='local' $local --label='base' $base --label='other' $other

Where $local, $base and $other are replaced by the corresponding file names.

This forces users to make their changes on the left, local panel.

Right. When I started using Mercurial, I couldn't believe that this
was the default config. Changing this would be a very good idea.

It has been proposed to change it to:

meld --label='local' $local --label='merge' $base --label='other' $other -o
$output

With this change users would make their changes in the "base" central panel
which we would probably rename to "merge".

I personally think that this is the wrong approach, but I know that
others would disagree with me. I personally prefer (in Mercurial
terms, so the details may be wrong) $local $output $base with premerge
= True. This loses the ancestor information though, so until we add
diff3 support for pruning that out, I can't really say that it's an
obvious win.

So your suggestion would be to have $base rather than $other? I think
that would be very different compared to all other tool
configurations. Personally I'd rather lose $base than $other...

Also, see the recent thread on this list about "Automatic 3-way merge
for conflicts".

I'll look into it, thanks.

The issue is that meld does not automatically try to merge the input files.
Instead you must manually click on the " "Changes->Merge all
non-conflicting" menu item. This is confusing to users because

My question is, is there a way to force meld to merge the non conflicting
changes when it starts? If not it would be great if it did, perhaps by
adding a "--merge" command line flag?

Unless I'm missing something, --auto-merge is what you're looking for,
possibly with a -o $output appended.

Is this a new command line option? I believe I did not see it on the
help file on 1.6...

So just to sum things up, do you think the following mercurial meld
configuration would be fine?:

meld.gui=True
meld.premerge=True
meld.args=--label='local' $local --label='merge' $base --label='other'
$other -o $output --auto-merge
meld.diffargs=-a --label='$plabel1' $parent --label='$clabel' $child

If --auto-merge has been recently introduced, what would happen if the
user used an older meld version that did not support it? Maybe we may
need to introduce a separate merld17 config...

Cheers,

Angel


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