Are revlog diff calculated as "text" ALWAYS?
Scott Palmer
swpalmer at gmail.com
Tue May 13 15:33:19 UTC 2014
On Tue, May 13, 2014 at 10:12 AM, Kastner Masilko, Friedrich <
kastner-masilko at at.festo.com> wrote:
> > From: mercurial-bounces at selenic.com [mailto:
> mercurial-bounces at selenic.com] On Behalf Of Jesus Cea
> >
> > Try the "echo -n 'X' >>z" version to avoid inserting linefeeds.
> > Sorry, my mistake.
>
> Indeed. Doing that, I too get snapshots (instead of deltas) all the way
> through. Even if I only change one byte within the file, a snapshot is
> taken.
>
> > My point is that since Mercurial already recognize files as binary, and
> > refuse to show a diff if you doesn't specify "hg diff --text", we could
> > use a binary diff backend anyway in those cases.
>
> AFAIK, internally Mercurial does not make a difference if the file is
> binary or not (what defines "binary", anyway?). However, the front-end
> commands that display diffs are running a heuristic to decide whether it
> might be binary-only content and therefore probably not worth printing.
>
> I always was under the impression that Mercurial uses the bdiff.c
> implementation, which works for binaries just as well. Seems like that
> changed. I can't see how that behavior is intended, though.
>
> regards,
> Fritz
>
Since Mercurial *always* uses a binary diff, the observed phenomenon must
be something else. E.g. a full snapshot is being stored for some reason
instead of a diff.
Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20140513/70441bd5/attachment-0002.html>
More information about the Mercurial
mailing list