After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 758804 - Merge all (from right|from left) has no effect
Merge all (from right|from left) has no effect
Status: RESOLVED FIXED
Product: meld
Classification: Other
Component: filediff
git master
Other Linux
: Normal major
: ---
Assigned To: meld-maint
meld-maint
Depends on:
Blocks:
 
 
Reported: 2015-11-29 15:47 UTC by Erik Schilling
Modified: 2016-01-12 11:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch containing fix (917 bytes, patch)
2015-11-29 16:07 UTC, Erik Schilling
none Details | Review

Description Erik Schilling 2015-11-29 15:47:22 UTC
Using any of the "Merge all" buttons from the menu has no effect.

Apparently an exception occurs, because on the console I can see:

For the "Merge all" button:

Traceback (most recent call last):
  • File "/home/ablu/meld/meld/filediff.py", line 607 in merge_all_non_conflicting_changes
    for mergedfile in merger.merge_3_files(False):
  • File "/home/ablu/meld/meld/merge.py", line 204 in merge_3_files
    mergedtext.append(self.texts[1][i])
  • File "/home/ablu/meld/meld/meldbuffer.py", line 272 in __getitem__
    txt_filtered = self.textfilter(txt, self.buf, line_start, line_end)
TypeError: <lambda>() takes exactly 1 argument (4 given)

For the "Merge all from right" button:

Traceback (most recent call last):
  File "/home/ablu/meld/meld/filediff.py", line 600, in action_pull_all_changes_right
    self.pull_all_non_conflicting_changes(src, dst)
  File "/home/ablu/meld/meld/filediff.py", line 582, in pull_all_non_conflicting_changes
    for mergedfile in merger.merge_2_files(src, dst):
  File "/home/ablu/meld/meld/merge.py", line 248, in merge_2_files
    mergedtext.append(self.texts[toindex][i])
  File "/home/ablu/meld/meld/meldbuffer.py", line 272, in __getitem__
    txt_filtered = self.textfilter(txt, self.buf, line_start, line_end)
TypeError: <lambda>() takes exactly 1 argument (4 given)

For the "Merge all from left" button:

Traceback (most recent call last):
  File "/home/ablu/meld/meld/filediff.py", line 596, in action_pull_all_changes_left
    self.pull_all_non_conflicting_changes(src, dst)
  File "/home/ablu/meld/meld/filediff.py", line 582, in pull_all_non_conflicting_changes
    for mergedfile in merger.merge_2_files(src, dst):
  File "/home/ablu/meld/meld/merge.py", line 248, in merge_2_files
    mergedtext.append(self.texts[toindex][i])
  File "/home/ablu/meld/meld/meldbuffer.py", line 272, in __getitem__
    txt_filtered = self.textfilter(txt, self.buf, line_start, line_end)
TypeError: <lambda>() takes exactly 1 argument (4 given)

It happens in the latest git and also in the latest version shipped by fedora (3.14.0).

This makes meld a lot less useful for me.

I am using Fedora 23, meld seems to use Python 2 (I have 2.7.10 installed).
In case you need further information let me know :)

Regards,
Erik
Comment 1 Erik Schilling 2015-11-29 16:07:00 UTC
Created attachment 316472 [details] [review]
Patch containing fix

This patch seems to fix the issue for me. Would be cool to get a review from somebody with more code knowledge :)
Comment 2 Kai Willadsen 2015-12-05 00:05:10 UTC
Awesome, thanks! I've pushed your fix to current master.

The bug in 3.14.0 is different, but has already been fixed in 3.14.1, so just needs Fedora to update to latest stable.
Comment 3 gaxweb 2016-01-12 11:56:18 UTC
Possible duplicate of https://bugzilla.gnome.org/show_bug.cgi?id=753097