[meld] meldapp: Only apply the auto merge flag to the last comparison started



commit 25d90f922816ad7cee251aa4e97331d66d47ae8f
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Fri Sep 19 06:06:51 2014 +1000

    meldapp: Only apply the auto merge flag to the last comparison started
    
    When more than one comparison is started with --diff, the --auto-merge
    flag should only apply to the final one, which will always be the
    one given with normal args, if such exists. Any way we do this is
    slightly odd, but this fix preserves the correct behaviour for a fairly
    common merge helper invocation with a single auto-merged three way and
    two two-way diffs to ancestors. It's also closer to what we did in
    1.8.x than applying auto-merge to everything.

 meld/meldapp.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/meld/meldapp.py b/meld/meldapp.py
index dc79084..5fd6ac2 100644
--- a/meld/meldapp.py
+++ b/meld/meldapp.py
@@ -307,10 +307,12 @@ class MeldApp(Gtk.Application):
         options.newtab = options.newtab or not command_line.get_is_remote()
         for i, paths in enumerate(comparisons):
             files = [command_line.create_file_for_arg(p) for p in paths]
+            auto_merge = (
+                options.auto_merge if i == len(comparisons) - 1 else False)
             try:
                 tab = self.open_files(
                     files, auto_compare=options.auto_compare,
-                    auto_merge=options.auto_merge, new_tab=options.newtab,
+                    auto_merge=auto_merge, new_tab=options.newtab,
                     focus=i == 0)
             except ValueError as err:
                 error = err


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