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 517902 - "Patch" mode
"Patch" mode
Product: meld
Classification: Other
Component: general
Other Linux
: Normal normal
: ---
Assigned To: Stephen Kennedy
Stephen Kennedy
Depends on:
Reported: 2008-02-21 16:18 UTC by Ross Burton
Modified: 2017-12-13 18:50 UTC
See Also:
GNOME target: ---
GNOME version: ---

Patch to add preliminary support for patch mode (8.57 KB, patch)
2008-06-22 15:45 UTC, Kai Willadsen
needs-work Details | Review

Description Ross Burton 2008-02-21 16:18:29 UTC
It would be really nice if meld has a patch mode, where you give it a file and a patch and it shows the changes.

Bonus points if it handles conflicts :)
Comment 1 Kai Willadsen 2008-06-22 15:45:46 UTC
Created attachment 113205 [details] [review]
Patch to add preliminary support for patch mode

This patch provides *preliminary* support for patch mode. It lets meld take a directory or file + a patch file (detected as anything ending in '.patch') in that order and creates a temporary patched version of the directory/file. This mode is currently only accessible through the commandline, and works thusly:

  meld ./meld/trunk/ PatchMode.patch

While all care has been taken with creation/removal of temp files, please don't blame me if it eats your data.
Comment 2 Kai Willadsen 2008-06-22 15:49:12 UTC
In the above patch, there are many things that could be done better. For a start, I just use the simplest patch mode possible, and if patch fails in any way at all, patch mode just bails out. i.e., no bonus points.

The other big issue is that only files that are changed by the patch are copied over (otherwise it can be really, really slow) and so appear in the dirdiff as though they're missing. This could be solved by adding a specific patch mode for the directory diff mode that pretends that any file that hasn't been patched exists and is identical.

I'm also not sure what the desired workflow is here; I just made it act the way I'd expect, but that's probably not the best or only option.
Comment 3 Stephen Kennedy 2008-06-26 21:53:00 UTC
Looks pretty useful, even in it's current state.

It would be great to have a custom treeview so that a patch could be viewed just like a directory compare if there are more than a few files changed.

I wonder is it possible to use an in-memory file so we don't have to worry about cleanup issues? It would be ok to disable the file selector in this case.

There's some code in vcview which handles applying patch files too. Can some of this be shared.

On that thought, perhaps the patch view could be a vc plugin - there's much less work to support this compared to a new treemodel.
Comment 4 Vincent Legoll 2009-04-02 22:49:59 UTC
I'm working on a VC plugin for patch mode
Comment 5 GNOME Infrastructure Team 2017-12-13 18:50:09 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: