Are revlog diff calculated as "text" ALWAYS?

Matt Mackall mpm at selenic.com
Wed May 14 01:40:49 UTC 2014


On Tue, 2014-05-13 at 19:11 -0400, Scott Palmer wrote:
> On Tue, May 13, 2014 at 6:59 PM, Jesus Cea <jcea at jcea.es> wrote:
> 
> >
> > An additional option would be to do real binary XDELTA-like diff ALWAYS,
> > but then I wonder how this would interact with "hg diff" when the file
> > is actually text.
> >
> 
> I had always assumed (incorrectly) that Mercurial worked like that anyway,
> having read that Mercurial needs to load entire files into RAM to perform
> the diff operation.  I also assumed that the diff algorithm used to produce
> the deltas that are stored in the repo had absolutely no relation to the
> output of "hg diff".  Is that assumption also wrong?  Reading
> http://mercurial.selenic.com/wiki/FAQ/TechnicalDetails it appears that I'm
> just full of incorrect assumptions. Sigh...

There's no fundamental reason that 'hg diff' and revlog's delta storage
need to use the same algorithm, it's just less code.

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list