Jump to content

Looking for a way to extract diff between two files as html

diff 2 html

  • Please log in to reply
1 reply to this topic

#1 kaleekun



  • Members
  • Pip
  • 1 posts

Posted 24 December 2015 - 01:21 AM

I am looking for a way to extract diff between two files as html - [diffing side by side].
My constraints :
1. Permission not available to install any program/utility to do diff to html.
2. Permission denied to download any file from internet - [worser -- No vim, emacs or python]
3. Just left out with VS2010 & perforce.

@ a client's place - for a customization project.

Is there any way to do this.

#2 P4Shimada


    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 31 December 2015 - 05:30 AM


Are you trying to do a side-by-side diff with a visual tool? When you mentioned html, is there an existing diff tool that exports the diff to html that you have used?

With Perforce, you can use the P4Merge tool, which is already built into the P4V gui client tool. If you diff on the command line, there are various flags for different types of output. For example, unified or summary output such as below:

$ p4 diff2 -ds //depot/test/foo#1 //depot/test/foo#2
==== //depot/test/foo#1 (text) - //depot/test/foo#2 (text) ==== content
add 1 chunks 1 lines
deleted 0 chunks 0 lines
changed 0 chunks 0 / 0 lines

$ p4 diff2 -du //depot/test/foo#1 //depot/test/foo#2
==== //depot/test/foo#1 (text) - //depot/test/foo#2 (text) ==== content
@@ -1,1 +1,2 @@
+2nd line foooooo


- p4 diff (command reference)

- Diffing files (User Guide)

- Resolving Conflicts

- Using the Image Diff Tool

- Configuring Editor and Diff Applications on Windows

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users