On May 27, 2006, at 4:41 PM, Till Backhaus wrote: FileMerge fails when having a file on the right side that contains a single dot somewhere.
Error Message: ============== Unable to compare files: s/.// (looks as if someone at apple should practice writing regular expressions ;)
So this turns out to be a pretty classic scanning error.
Behind the scenes, FileMerge simply uses the Unix diff(1) tool, driving it with -ea to output the diffs as a script for the ed(1) editor. This provides some context in the form of directives for add, delete, or replace, which FileMerge displays in different ways in the merge window.
If you know ed script, you can probably see this coming.
The ed script signals a diff with a command line, the text of the replacement, and a terminating sequence consisting of a single period on a line. The ed scripting language has been like this for thirty years. I used it myself when writing the Apple II Reference Manual in 1978.
So if your "replacement text," that is, a line in the right side file, consists of the ed script termination sequence, then the replacement text is null, and the error occurs.
Thanks for finding this. This bug has been in FileMerge since it was written in 1998, and you're the first person outside Apple to have found it.
Chris |