Are revlog diff calculated as "text" ALWAYS?
Kastner Masilko, Friedrich
kastner-masilko at at.festo.com
Wed May 14 08:24:16 UTC 2014
> From: mercurial-bounces at selenic.com [mailto:mercurial-bounces at selenic.com] On Behalf Of Jesus Cea
>
> You don't want fixed size chunks (unless your source files are database
> files). Any insertion in the middle of the file will change all blocks
> after it.
>
> You want to find a suitable "linefeed" mark that doesn't change a lot
> when you do small changes to the file. For instance, for XML files, the
> "line ending" could be the character ">".
>
> I wonder if bdiff implementation demands a sequence of "lines"/blocks
> as input, or could manage whole file blocks, like "xdelta"
> <http://xdelta.org/>.
>
> Another issue would be when to use current diff or binary diff. Current
> implementation detects "binary" when byte '\0' is present in the input,
> but the described XML doesn't qualify. Maybe something like "'\0'
> present or 'size/number of linefeeds' exceeds a threshold". But sounds
> quite magical to me.
>
> 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.
It is clear that my proposal is _not_ the generic solution to all those problems resulting from the used line-based algorithm. But it would ease the described situation somewhat, without cutting too much into performance or usage. Let's see if a patch gets some positive reviews...
Development Software Systems
Festo Gesellschaft m.b.H.
Linzer Strasse 227
Austria - 1140 Wien
Firmenbuch Wien
FN 38435y
UID: ATU14650108
Tel: +43(1)91075-198
Fax:
www.festo.at
Der Inhalt dieser E-Mail und moeglicher Anhaenge sind ausschliesslich fuer den bezeichneten Adressaten bestimmt.
Jede Form der Kenntnisnahme, Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser E-Mail und
moeglicher Anhaenge durch unberechtigte Dritte ist unzulaessig. Wir bitten Sie, sich mit dem Absender der E-Mail in
Verbindung zu setzen, falls Sie nicht der Adressat dieser E-Mail sind sowie das Material von Ihrem Computer zu loeschen.
This e-mail and any attachments are confidential and intended solely for the addressee. The perusal, publication, copying or
dissemination of the contents of this e-mail by unauthorised third parties is prohibited. If you are not the intended recipient of this
e-mail, please delete it and immediately notify the sender.
More information about the Mercurial
mailing list