Message5498

Author mpm
Recipients Omnifarious, ThomasAH, abuehl, djc, jglick, kupfer, mathieu.clabaut, pmezard, vadiml
Date 2008-03-09.22:48:17
Content
Ok, here's a proposed fix and the problems that subsequently crawl out from
under the rock:

In filelog, override revlog.revision. Add metadata that says "the revision
returned by revlog is not a full revision as promised but a revision of file
x@rev + the body here treated as a delta." Then filelog.revision can instantiate
a temporary filelog object for x, get the specified revision, and apply the
delta. Do the appropriate steps in filelog.add to make this work.

Now with a little luck, getting the -next- revision from the filelog will just
work. Otherwise, we'll need to hack revlog.revision to call itself (and thereby
filelog.revision) to grab the base revision.

So now we've got a scheme that mostly does away with the layering violations as
revlog doesn't have to have any special knowledge about other revlogs (it's all
in the filelog class, which already knows how to find and open revlog from a
pathname). It even gets the case where c@z is a copy of b@y which is a copy of
a@x right automatically. 

But we've also got a huge compatibility problem. An old client can't just pull
this data and expect it to work. Instead, we've got to add a new version of the
wire protocol that allows us to send these sorts of deltas to new clients, but
sends full revisions to old clients. And a new client would like to take old
client data and deltify the copies, which may not be possible at pull time (for
instance, if the destination revlog is sent before the source revlog). Also,
hashes at the revlog layer and at the filelog layer no longer agree. Ouch.

In short: not an easy problem.

Marking deferred.
History
Date User Action Args
2008-03-09 22:48:19mpmsetmessageid: <1205102899.14.0.757196483183.issue883@selenic.com>
2008-03-09 22:48:19mpmsetrecipients: + Omnifarious, ThomasAH, kupfer, pmezard, mathieu.clabaut, jglick, djc, abuehl, vadiml
2008-03-09 22:48:19mpmlinkissue883 messages
2008-03-09 22:48:17mpmcreate