Message5794

Author mpm
Recipients Omnifarious, TakeyMcTaker, ThomasAH, abuehl, djc, jglick, kupfer, mathieu.clabaut, pmezard, vadiml
Date 2008-04-01.19:59:54
Content
You're missing the first conceptual hurdle: if we change what we're storing in
the revlog, we change the hashes. Revlog is a self-contained black box. You hand
it "data", it hands you back an identifier hash. If we change our data from
"copy + full revision" to "copy + delta", revlog will hand us back a different
identifier. Thus, old and new clients will disagree about the hash for "file x
containing X, copied from y@z".

To get past this, we would need to hoist both the hash calculation and checking
up out of revlog into filelog (and changelog, and manifest). Then when we
checked in a copy, we'd have to first calculate the hash for "copy + full
revision", then calculate the delta, then tell revlog "please store 'copy +
delta' but with the hash for 'copy + full revision'". 

To recover a revision, we'd have to get "copy + delta", look up the copy,
reconstruct that revision, apply the delta to get the full revision, then
calculate the hash of "copy + full revision" and compare it with the identifier
we were asked to retrieve.

On pull over the existing wire protocol, we'd have to do the above, and then
take our reconstructed "copy + full revision" and turn it into a delta (usually,
but not always, against an empty file).
History
Date User Action Args
2008-04-01 20:00:00mpmsetmessageid: <1207080000.3.0.556588371225.issue883@selenic.com>
2008-04-01 20:00:00mpmsetrecipients: + Omnifarious, ThomasAH, kupfer, pmezard, mathieu.clabaut, jglick, djc, abuehl, vadiml, TakeyMcTaker
2008-04-01 20:00:00mpmlinkissue883 messages
2008-04-01 19:59:54mpmcreate