Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


FileMerge | 3 comments | Create New Account
Click here to return to the 'FileMerge' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
FileMerge
Authored by: Anonymous on Apr 17, '02 05:24:51AM

You should also try FileMerge in the Developer tools. Its is a (great) GUI tool to compare and merge files... and it works with any type of file.



[ Reply to This | # ]
FileMerge needs correct end of line characters
Authored by: Ian Downie on Aug 12, '03 07:26:16AM

Filemerge is indeed better than diff because it displays a nice side by side comparison of the two files with a visual display of the differences, and then allows you to merge the files if you want. However, I found that it crashes if you use it on files with Mac end of line characters - I needed to compare two database files produced by Gene, a family history application which I have to run in Classic.

If you have files like that, you need to use tr to convert the end of line characters before you can run Filemerge on them. It's not really worth a shell script; just go to the terminal and navigate to the directory in which your files are saved, then enter:

tr "\r" "\n" <filename >tempfilename

where filename is the name of your first file and tempfilename is a name of your choice for the converted file.

Do the same thing again for the second file, then run FileMerge (it's in Developer/Applications if you have installed Developer Tools), choosing your two temporary files to compare.

After merging the files, replace the original end of line characters:

tr "\n" "\r" <mergefilename >newmergefilename

where mergefilename is the name you chose when saving the merged file in Filemerge and newmergefilename is your chosen name for the final, merged file with the original end of line characters, ready to view in your Classic application. You will probably also have to change the filetype and creator depending on whether your application can recognise the merged file.



[ Reply to This | # ]