Unified Diff Patch Files

General questions about using ExamDiff Pro, ideas for new features, bug reports, and usage tips.
Post Reply
JohnHind
New Member
Posts: 2
Joined: Thu Jun 06, 2013 9:45 am

Unified Diff Patch Files

Post by JohnHind » Thu Jun 06, 2013 9:56 am

Is there any chance you will add the "unified" format of Diff report often required by patch utilities?

According to Wikipedia:
The unified format (or unidiff) inherits the technical improvements made by the context format, but produces a smaller diff with old and new text presented immediately adjacent. Unified format is usually invoked using the "-u" command line option. This output is often used as input to the patch program. Many projects specifically request that "diffs" be submitted in the unified format, making unified diff format the most common format for exchange between software developers.
A service I use regularly requires patch files as produced by the following command line:

Code: Select all

diff -urN old_file new_file > mychange.patch
You'd pick up my licence fee for one if ExamDiff could produce these patch files (from the GUI, plus command line as a bonus).

User avatar
psguru
Site Admin
Posts: 1772
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Unified Diff Patch Files

Post by psguru » Thu Jun 06, 2013 7:43 pm

Sorry, no near-term plans for Unified Diff format.
psguru
PrestoSoft

JohnHind
New Member
Posts: 2
Joined: Thu Jun 06, 2013 9:45 am

Re: Unified Diff Patch Files

Post by JohnHind » Sat Jun 08, 2013 2:32 am

If you are unwilling to develop this specifically, how about a generic facility for external tools? I mean that you specify a name and command line in settings and then the name shows up on a special menu. When you select it, the command line is launched.

This needs special tokens for pasting in the left and right file paths as parameters on the command line. Most programs get this bit wrong: you need the ability to assemble the path from fragments so, for example, output paths can also be synthesized. I suggest the following:

$commonpath - The part of the path which is common to left and right files.
$leftpath - the rest of the path on the left, up to, but excluding the file name.
$rightpath - ditto for the right.
$leftname - the file name without extension on the left.
$rightname - ditto for the right.
$leftext - the file name extension on the left.
$rightext - ditto on the right.

User avatar
psguru
Site Admin
Posts: 1772
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Unified Diff Patch Files

Post by psguru » Sat Jun 08, 2013 8:27 am

Something along these lines is actually planned for the next version.
psguru
PrestoSoft

ViperGeek
New Member
Posts: 1
Joined: Thu Sep 07, 2017 7:38 am

Re: Unified Diff Patch Files

Post by ViperGeek » Thu Sep 07, 2017 7:43 am

Sorry to revive an old thread, but given ExamDiff Pro is one of the best diff programs, I always simply assumed I could view and parse Unified Diff files. After trying several times, I realized that EDP complains that it is an "Invalid session file."

Is there any way to parse .diff files using ExamDiff Pro, or must I use another solution such as TortoiseGitUDiff?

- Dave

User avatar
psguru
Site Admin
Posts: 1772
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Unified Diff Patch Files

Post by psguru » Fri Sep 08, 2017 7:10 am

No, unfortunately there's no such functionality in ExamDiff Pro.
psguru
PrestoSoft

Post Reply