Topic: creating a hdiff file?

well the main thing is how do i do it? i downloaded the hdiff file from http://www.ginini.com/software/hdiff/, so where do i start?

2 (edited by nprajan 2005-07-10 09:14)

Re: creating a hdiff file?

I'm assuming you're trying to run hdiff on Linux.

If so, just copy hdiff somewhere, and execute it as follows.

$ ./hdiff -n -l "3" -o "output.html" -t "Report Title" file1 file2

Use hdiff help for more info on the operators:

$ ./hdiff help

You could also make hdiff an executable by copying it into your bin folder (e.g. /usr/bin)

You will notice that PunBB's version of hdiff differs from the original version found on the ginini website. Personally, I think Rickard's changes are cooler as it strips out the timestamp from each filename in the hdiff report. Moving the legend to the top also makes comprehending the report a breeze. (Thanks Rickard!)

The modified version of hdiff can be found here:
http://punbb.org/stuff/hdiff

In case you're looking for the hack used to remove the timestamps from the report, it looks like this. It simply removes the last 36 characters in the filename:

$leftfile = substr($leftfile, 0, -36);

$rightfile = substr($rightfile, 0, -36);

In the event you face problems running hdiff with the -n operator for line numbering, refer to a possible reason and fix here:
http://www.ginini.com/cgi-bin/yabb/YaBB … 1116585570

Hope this helps.

Re: creating a hdiff file?

thanx for the help,

but when i type in

$ ./hdiff -n -l "3" -o "difference.html" -t "Forums difference" /Punbb /forums

it says

$: command not found

and if i take off the "$" it gives me the error

./hdiff:: Permission denied

eather im not doin it right or i just can do it on this server.

Re: creating a hdiff file?

Woops! My bad. The $ was just an indication that it was a command line entry. tongue

It seems like you probably haven't set the permissions for hdiff to be executable. Try:

chmod 744 hdiff

This should allow you to execute hdiff as root or a power user.

Re: creating a hdiff file?

thanx working great smile

6 (edited by newneo 2005-11-13 18:39)

Re: creating a hdiff file?

Hi

I actually use hdiff on windows by using cygwin and i have a problem to built a hdiff file when i want to "scan" complete folders and no only files

c:\>perl.exe hdiff -n -l "3" -o "difference.html" -t "Forums difference" /Punbb /forums

this doesn't work on win, the mistake is /Punbb not found

I've tried with c:\program files\punbb but it's the same

If someone can tell me how can I do I thank him a lot

Re: creating a hdiff file?

ok I've found the matter so I write here for ones who had or will have this problem.

the mistake is because of the space in "program files", but it doesn't work with brackets, so put your folder at the root

c:\folder1 and c:\folder2