Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm reviewing my peer's code. I use SourceGear DiffMerge as my diff program, on a Windows environment.

While I'm using the diff program, I can clearly see the code changes, etc.

Is it possible to save the diff display somehow, with all its colorful rendering and strike-throughs so that I can send my comments by mail?

In other words, is it possible to export the diff display to a single file (which includes all the relevant data) to be displayed without the actual need to save the two files separately? (Perhaps HTML is fit for this job).

Can you recommend on a diff program that can export the diff as a single file?

Thanks in advance!

share|improve this question

closed as off topic by Rein Henrichs, Karl Bielefeldt, Walter, Mark Trapp Oct 26 '11 at 13:17

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Why not just send the diff file? It contains exactly the changes made and can be viewed with most programmers text editors with color etc. Or do you want to make a screenshot?? – Benjamin Bannier Oct 25 '11 at 16:06
That depends on the program you are using. No general solution would apply. If the program has no way to save the diff report, record the diff as a movie. – NoChance Oct 25 '11 at 16:10
diff -u fileold filenew > patch.patch – Lazy Badger Oct 26 '11 at 3:39
Developer tools are off-topic here: you'd want to check Stack Overflow instead. – user8 Oct 26 '11 at 13:18

WinMerge can diff compare any file(s) or folder(s) and generate a report (Tools > Generate Report) of differences in various formats (including HTML and CSV).

You can generate a report add your own comments into the results. Run the report at the file level to get a colored diff compare.

Ultimately, the best method does depend on your tools (which you did not specify). TFS has some powerful diff tools. TFS is also highly extensible, lots of plugins you can download.

share|improve this answer
Winmerge in common is one of the weakest differs-mergers in Windows-world (IMNSHO) – Lazy Badger Oct 26 '11 at 3:41

Common practice in UNIX-land is to just send the plain diff output. The recipient can then use a tool of their choice to read it.

share|improve this answer
Windows environment, I updated my question. – Ron Klein Oct 25 '11 at 18:41
Still applies. I merely mentioned UNIX because that's where diff originally comes from, and because diffs are ubiquitous in UNIX-land. Best practices from the home of diff should also make sense on other platforms. – tdammers Oct 25 '11 at 18:45

TortoiseMerge from TortoiseSVN can export result of files-compare to *.diff (if you don't want to use old good ported to Win diff -u)

TortoiseUDiff (from the same source) show this colored-diff (sorry for non-readable text - it's UTF8 without BOM, don't know how to visualize it in TortoiseUDiff correctly: never use this feature): red is deleted strings, green - added, white - context

enter image description here

share|improve this answer

Whenever I want to save diff results to a file, I use sdiff Unix/Linux/Cygwin utility. No color but still human readable.

share|improve this answer
Windows environment, I updated my question. – Ron Klein Oct 25 '11 at 18:41
@RonKlein Hence Unix/Linux/Cygwin. Cygwin applies to Windows. – Dan Jul 18 at 14:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.