On Sun, 25 Dec 2016 15:28:52 +0100 Jérémy Bobbio wrote:
Hi Lunar!
> You would not have to read the file twice as long as you do the hash
> in the difference module, when each line is actually fed to diff.
> A similar trick is already used to cope with files that are too long,
> see diffoscope.di
Jérémy Bobbio wrote:
[…]
> h += hash(line)
[…]
Watch out, using hash() often leads to unreproducible output. :)
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` la...@debian.org / chris-lamb.co.uk
`-
Hi!
Маша Глухова:
> The reason why I did not use some algorihm like that is that it requires to
> read files for the second time. Right now, all the actual work with the
> content of the files (except for the quick check for has_same_content) is
> delegated to diff, and on big files, it occupies m
Jeremy,
Thank you for sharing that!
The reason why I did not use some algorihm like that is that it requires to
read files for the second time. Right now, all the actual work with the
content of the files (except for the quick check for has_same_content) is
delegated to diff, and on big files, it o
Маша Глухова:
> I believe the attached patch would provide the requested functionality.
Nice work! :)
> From: Maria Glukhova
> Date: Sat, 24 Dec 2016 12:29:57 +0200
> Subject: [PATCH] Add detection of order-only difference in plain text format.
>
> Detect if the text files' contents differ only
Маша Глухова wrote on Sat, Dec 24, 2016 at 18:14:16 +:
> +def order_only_difference(unified_diff):
> +diff_lines = unified_diff.splitlines()
> +added_lines = [line[1:] for line in diff_lines if line.startswith('+')]
> +removed_lines = [line[1:] for line in diff_lines if line.startsw
I believe the attached patch would provide the requested functionality.
From 0ae6d16037cc4912e5a165ee050e31e99402c912 Mon Sep 17 00:00:00 2001
From: Maria Glukhova
Date: Sat, 24 Dec 2016 12:29:57 +0200
Subject: [PATCH] Add detection of order-only difference in plain text format.
Detect if the tex
7 matches
Mail list logo