GNOME Bugzilla – Bug 655315
changing file permissions results with meld error: Invoking 'patch' failed
Last modified: 2012-10-19 19:43:57 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)
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.
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.
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.