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 655315 - changing file permissions results with meld error: Invoking 'patch' failed
changing file permissions results with meld error: Invoking 'patch' failed
Status: RESOLVED FIXED
Product: meld
Classification: Other
Component: filediff
1.4.x
Other Linux
: Normal normal
: ---
Assigned To: Kai Willadsen
meld-maint
Depends on:
Blocks:
 
 
Reported: 2011-07-26 07:39 UTC by avnerbh
Modified: 2012-10-19 19:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (6.04 KB, patch)
2011-08-05 22:05 UTC, Kai Willadsen
none Details | Review
Updated patch (7.25 KB, patch)
2012-07-13 21:22 UTC, Kai Willadsen
none Details | Review

Description avnerbh 2011-07-26 07:39:37 UTC
Note: this error was reproduced by Kai (I believe on Meld 1.5.2) - see email thread "bug report Invoking 'patch' failed for a .sh file" in meld-list@gnome.org.

Scenario:
1. change only the permissions of a file - without changing its content (for example: 644 -> 755)
2. invoke meld (for example: meld .&)
3. meld will present above file in the list of files that were changed.
4. double-click the line of our file
=> you will get above error message.


(I used meld 1.4.0 with git 1.7.1 and patch 2.6 on RHEL 6.0, but it can be reproduced otherwise as well)
Comment 1 Kai Willadsen 2011-08-05 22:05:35 UTC
Created attachment 193331 [details] [review]
Patch

This patch (applies to current HEAD) fixes the issue for me, and adds some poorly-placed feedback about mode changes in Git-managed files. Could you please test it and provide feedback? I'm a little concerned that the changed parsing may have introduced bugs.

A longer explanation follows.

Git makes life somewhat difficult for us by reporting exec bit changed
files as modified; this appears to be the only case where a 'modified'
file won't give us a valid patch.

This commit adds pruning of metadata from git-generated diffs, makes
sure that an empty-of-content git diff results in an actually empty
patch, and changes our git plumbing queries to parse out permission
change information so that we can show it in the UI.

With this change, we're abusing the "Options" column in the VC UI to
show essentially random extra information. However, reworking that UI
so that it makes sense across VCs is a huge project, and Git doesn't
otherwise use the "Options" column.
Comment 2 Kai Willadsen 2012-07-13 21:22:00 UTC
Created attachment 218759 [details] [review]
Updated patch

Updated patch. This patch applies against Meld 1.6, and is somewhat cleaner and better documented. This won't apply cleanly against current git head, but it's pretty close - just accept the windows path change and everything should be fine.
Comment 3 Kai Willadsen 2012-10-19 19:43:57 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.