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

kaleekun

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 24 December 2015 - 01:21 AM

Hi,
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

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 31 December 2015 - 05:30 AM

Hello,

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 @@
 foofoofoo
+2nd line foooooo

REFERENCES

- p4 diff (command reference)
https://www.perforce...ef/p4_diff.html

- Diffing files (User Guide)
https://www.perforce....html#DB5-21239

- Resolving Conflicts
https://www.perforce...lving-conflicts

- Using the Image Diff Tool
https://www.perforce...age-diff-tool-3

- Configuring Editor and Diff Applications on Windows
http://answers.perfo...rticles/KB/3411




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users