Are revlog diff calculated as "text" ALWAYS?

Jesus Cea jcea at jcea.es
Tue May 13 11:45:52 UTC 2014


On 13/05/14 10:22, Kastner Masilko, Friedrich wrote:

> I just tried that with 2.7.1, and indeed the first character-adding
> triggers a second snapshot. However, repeated character-adding does
> not do that for me:

My fault. "echo "X" >>z" adds a linefeed. Try "echo -n "X" >>z".

> The first double snapshot is interesting, though, but I guess here it
> is not so much about the diffing, but about the revlog format. The
> later has rules when a full snapshot or a delta should be applied. I
> don't want to go into details, but one thing seems to be clear from
> my test: 2.7.1 is not using a text-based diff for revlog creation.

It is. Try the "echo -n 'X' >>z" version to avoid inserting linefeeds.
Sorry, my mistake.

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.

-- 
Jesús Cea Avión                         _/_/      _/_/_/        _/_/_/
jcea at jcea.es - http://www.jcea.es/     _/_/    _/_/  _/_/    _/_/  _/_/
Twitter: @jcea                        _/_/    _/_/          _/_/_/_/_/
jabber / xmpp:jcea at jabber.org  _/_/  _/_/    _/_/          _/_/  _/_/
"Things are not so easy"      _/_/  _/_/    _/_/  _/_/    _/_/  _/_/
"My name is Dump, Core Dump"   _/_/_/        _/_/_/      _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 538 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20140513/77a50cb8/attachment.asc>


More information about the Mercurial mailing list