Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FileMerge BugReport



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
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden

References: 
 >FileMerge BugReport (From: Till Backhaus <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.