On Mon, Feb 6, 2012 at 9:02 AM, C. Michael Pilato <cmpil...@collab.net> wrote: > On 02/04/2012 01:10 PM, Hyrum K Wright wrote: >> On Sat, Feb 4, 2012 at 10:59 AM, Julian Foad <julianf...@btopenworld.com> >> wrote: >>> I'm not quite sure I fully follow you at the moment, so I'm not sure if my >>> reply is on the right track at all, but it's really sounding like you're up >>> against a mis-match of responsibilities between Ev1 which sends deltas >>> according to particular rules and Ev2 which is designed to be wrapped >>> inside a driver-receiver pairing that knows privately how to deltify and >>> recover to full text in any way it wants to. The shims obviously need to >>> convert from the Ev2 deltification back (via a full text intermediary if >>> necessary) to what Ev1 expects. >> >> What's driving this discussion is this: Up until this point in the >> Ev2 shims we've been supplying a NULL base checksum for apply >> textdelta, which the receivers have dutifully ignored. However, when >> the Ev2 shims attempt to be honest about the fact that they are using >> the empty stream for the text base, the receivers start complaining, >> because that's not what they expected---even though the end result is >> the same. In essence, all these checks are returning false positives, >> which is extremely unpleasant. >> >> I don't know that there is an easy way around this, since by the time >> we're translated from Ev2->delta-editor, we don't have the original >> text base, or its checksum, available to us. We have the full text, >> which is the reason the new text base is the empty stream: it's the >> only one we need. >> >> Does that make any sense? > > Yeah, sounds like we're in a tough spot here. The checksums in Ev1 exist > only as sanity checks -- they definitely are NOT the primary selection > mechanism for the editor implementation's base text. > > I assume we still have a valid checksum to pass to close_file() (the > checksum of the post-edit fulltext for that file), right? It's just the > pre-edit base checksum that's the problem?
Correct. r1241097 relaxes the checks by special-casing the checksum of the empty stream (as discussed elsethread). This addresses the immediate issue, and I think the generalized case can be punted toward the individual ra-layers long-term. -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/