Commit Graph

124 Commits

Author SHA1 Message Date
Patrick Mezard
16811ddcba diff: --ignore-blank-lines was too enthusiastic
It was ignoring changes from:

ab

to:

a
b
2011-11-13 21:37:14 +01:00
Nicolas Venegas
2582d1e3d9 mdiff/patch: fix bad hunk handling for unified diffs with zero context
Prior to this patch "hg diff -U0", i.e., zero lines of context, would
output hunk headers with a start line one greater than what GNU patch
and git output. Guido van Rossum documents the unified diff format[1]
as having a start line value "one lower than one would expect" for
zero length hunks.

Comparing the behaviour of the three systems prior to this patch in
transforming

  c1
  c3

to

  c1
  c2
  c3

- GNU "diff -U0" reports the hunk as "@@ -1,0 +2 @@"
- "git diff -U0" reports the hunk as "@@ -1,0 +2 @@"
- "hg diff -U0" reports the hunk as "@@ -2,0 +2,1 @@"

After this patch, "hg diff -U0" reports "@@ -1,0 +2,1 @@".

Since "hg export --config diff.unified=0" outputs zero-context unified
diffs, "hg import" has also been updated to account for start lines
one less than expected for zero length hunk ranges.

[1]: http://www.artima.com/weblogs/viewpost.jsp?thread=164293
2011-11-09 16:55:59 -08:00
Matt Mackall
8f2b7260c4 merge with stable 2011-11-10 11:00:27 -06:00
Mads Kiilerich
dcf70e02fc diff: always use / in paths in diff
Subrepo diffs would sometimes use backslash on windows.
2011-11-07 02:49:00 +01:00
Brodie Rao
7e742515c2 mdiff: speed up showfunc for large diffs
This addresses the following issues with showfunc:

- Silly usage of regular expressions.
- Doing str.rstrip() needlessly in an inner loop.
- Doing catastrophic backtracking when trying to find a function line.

Finding function text is now at worst O(n lines in the old file), and
at best close to O(n hunks).

Given a diff like this[1]:

 src/main/antlr3/uk/ac/cam/ch/wwmm/pregenerated/ChemicalChunker.g        |      4 +-
 src/main/java/uk/ac/cam/ch/wwmm/pregenerated/ChemicalChunkerLexer.java  |      2 +-
 src/main/java/uk/ac/cam/ch/wwmm/pregenerated/ChemicalChunkerParser.java |  29189 +++++----
 3 files changed, 14741 insertions(+), 14454 deletions(-)

[1]: https://bitbucket.org/wwmm/chemicaltagger/changeset/d2bfbaecd4fc/raw

Without this change, hg log --stat --config diff.showfunc=1 takes an
absurdly long time to complete:

   CallCount    Recursive    Total(ms)   Inline(ms) module:lineno(function)
       32813            0     80.3546     40.6086   mercurial.mdiff:160(yieldhunk)
   +65062746            0     25.7227     25.7227   +<method 'match' of '_sre.SRE_Pattern' objects>
   +65062746            0     14.0221     14.0221   +<method 'rstrip' of 'str' objects>
       +1809            0      0.0009      0.0009   +mercurial.mdiff:148(contextend)
       +1809            0      0.0003      0.0003   +<len>
    65062746            0     25.7227     25.7227   <method 'match' of '_sre.SRE_Pattern' objects>
    65062763            0     14.0221     14.0221   <method 'rstrip' of 'str' objects>
         543            0      0.1631      0.1631   <zlib.decompress>
           3            0      0.0505      0.0505   <mercurial.bdiff.blocks>
       31007            0     80.4564      0.0477   mercurial.mdiff:147(_unidiff)
      +32813            0     80.3546     40.6086   +mercurial.mdiff:160(yieldhunk)
          +3            0      0.0505      0.0505   +<mercurial.bdiff.blocks>
       +3618            0      0.0022      0.0022   +mercurial.mdiff:154(contextstart)
       +5427            0      0.0013      0.0013   +<len>
          +3            0      0.0001      0.0000   +re:188(compile)
           1            0     80.8381      0.0322   mercurial.patch:1777(diffstatdata)
     +107499            0      0.0235      0.0235   +<method 'startswith' of 'str' objects>
      +31014            0     80.7820      0.0071   +mercurial.util:1284(iterlines)
          +3            0      0.0000      0.0000   +<method 'search' of '_sre.SRE_Pattern' objects>
          +4            0      0.0000      0.0000   +mercurial.patch:1783(addresult)
          +3            0      0.0000      0.0000   +<method 'group' of '_sre.SRE_Match' objects>
           6            0      0.0444      0.0283   mercurial.mdiff:12(splitnewlines)
          +6            0      0.0160      0.0160   +<method 'split' of 'str' objects>
          32            0      0.0246      0.0246   <method 'update' of '_hashlib.HASH' objects>
          11            0      0.0236      0.0236   <method 'read' of 'file' objects>
Time: real 80.880 secs (user 80.200+0.000 sys 0.380+0.000)

With this change, it's almost as fast as not using showfunc at all:

   CallCount    Recursive    Total(ms)   Inline(ms) module:lineno(function)
         543            0      0.1699      0.1699   <zlib.decompress>
           3            0      0.0501      0.0501   <mercurial.bdiff.blocks>
       32813            0      0.0415      0.0348   mercurial.mdiff:161(yieldhunk)
      +70837            0      0.0058      0.0058   +<method 'isalnum' of 'str' objects>
       +1809            0      0.0006      0.0006   +mercurial.mdiff:148(contextend)
       +1809            0      0.0002      0.0002   +<len>
           1            0      0.4879      0.0310   mercurial.patch:1777(diffstatdata)
     +107499            0      0.0230      0.0230   +<method 'startswith' of 'str' objects>
      +31014            0      0.4335      0.0065   +mercurial.util:1284(iterlines)
          +3            0      0.0000      0.0000   +<method 'search' of '_sre.SRE_Pattern' objects>
          +4            0      0.0000      0.0000   +mercurial.patch:1783(addresult)
          +1            0      0.0004      0.0000   +re:188(compile)
          32            0      0.0293      0.0293   <method 'update' of '_hashlib.HASH' objects>
           6            0      0.0427      0.0279   mercurial.mdiff:12(splitnewlines)
          +6            0      0.0147      0.0147   +<method 'split' of 'str' objects>
       31007            0      0.1169      0.0235   mercurial.mdiff:147(_unidiff)
          +3            0      0.0501      0.0501   +<mercurial.bdiff.blocks>
      +32813            0      0.0415      0.0348   +mercurial.mdiff:161(yieldhunk)
       +3618            0      0.0012      0.0012   +mercurial.mdiff:154(contextstart)
       +5427            0      0.0006      0.0006   +<len>
      107597            0      0.0230      0.0230   <method 'startswith' of 'str' objects>
          16            0      0.0213      0.0213   <mercurial.mpatch.patches>
         194            0      0.0149      0.0149   <method 'split' of 'str' objects>
Time: real 0.530 secs (user 0.450+0.000 sys 0.070+0.000)
2011-09-19 15:58:03 -07:00
Mads Kiilerich
35ef3c1409 mdiff: carriage return (\r) is also ignorable whitespace 2010-10-19 03:55:06 +02:00
Benoit Boissinot
0a73b8e369 mdiff.patch(): add a special case for when the base text is empty
remove the special casing from revlog.addgroup()
2010-08-23 13:28:04 +02:00
Benoit Boissinot
621e9c06bf remove header handling out of mdiff.bunidiff, rename it 2010-03-09 18:31:57 +01:00
Matt Mackall
8d99be19f0 many, many trivial check-code fixups 2010-01-25 00:05:27 -06:00
Matt Mackall
cd3ef170f7 Merge with stable 2010-01-19 22:45:09 -06:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Patrick Mezard
a9ef9386bc mq: preserve --git flag when merging patches
Without this, merging a patch queue without diff.git=1 downgrades all git
patches to regular patches, losing data in the process.
2010-01-01 19:53:05 +01:00
Patrick Mezard
2f3f5f28ea mdiff: fix diff -b/B/w on mixed whitespace hunks (issue127)
Previous code was computing hunks then checking if these hunks could be ignored
when taking whitespace/blank-lines options in accounts. This approach is simple
but fails with hunks containing both whitespace and non-whitespace changes, the
whole hunk is emitted while it can be mostly made of whitespace. The new
version normalize the whitespaces before hunk generation, and test for
blank-lines afterwards.
2009-11-11 18:31:42 +01:00
Martin Geisler
5b4e5428df replace "i in range(len(xs))" with "i, x in enumerate(xs)"
The remaining occurrences should be the ones where "xs" is mutated or
where "i" is used for index arithmetic.
2009-05-26 22:59:52 +02:00
Patrick Mezard
d6ce43b965 patch: support diff data loss detection and upgrade
In worst case, generating diff in upgrade mode can be two times more expensive
than generating it in git mode directly: we may have to regenerate the whole
diff again whenever a git feature is detected. Also, the first diff attempt is
completely buffered instead of being streamed. That said, even without having
profiled it yet, I am convinced we can fast-path the upgrade mode if necessary
were it to be used in regular diff commands, and not only in mq where avoiding
data loss is worth the price.
2010-01-01 20:54:05 +01:00
Simon Heimberg
09ac1e6c92 separate import lines from mercurial and general python modules 2009-04-28 17:40:46 +02:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Dirkjan Ochtman
9bf5b2380e diff: fix obscure off-by-one error in diff -p 2008-11-27 17:00:54 +01:00
Thomas Arendsen Hein
712c41183e Remove trailing space 2008-10-22 18:55:07 +02:00
Dirkjan Ochtman
7c9e09c95d patch/diff: use a separate function to write the first line of a file diff 2008-10-22 13:14:52 +02:00
Martin Geisler
d0e419c6a7 mdiff: compare content of binary files directly
A plain Python string comparison stops when the first mismatch is
found, whereas the call to md5 would need to compute the hash over the
entire string and only then do the comparison.
2008-08-09 02:10:22 +02:00
Dirkjan Ochtman
34d6bea8db python 2.6 compatibility: compatibility wrappers for hash functions 2008-04-04 22:36:40 +02:00
Patrick Mezard
8e0cbccd26 Let --unified default to diff.unified (issue 1076) 2008-04-04 22:15:14 +02:00
Matt Mackall
11423d02c7 diff: don't show function name by default
We'd mistakenly made the -p option always on, which meant there was no
way to turn it off. It also meant that we were sometimes splitting
multibyte characters in function name, which isn't a good default.
2008-01-16 11:14:24 -06:00
Dustin Sallings
bebcdac954 Use both the from and to name in mdiff.unidiff.
This fixes a compatibility issue with git diffs.
* * *
2007-11-01 12:17:59 -07:00
Matt Mackall
a92b40c2ed revlog: generate trivial deltas against null revision
To avoid extra memory usage and performance issues with large files,
generate a trivial delta header for deltas against the null revision
rather than calling the usual delta generator.

We append the delta header to meta rather than prepending it to data
to avoid a large allocate and copy.
2007-10-03 17:17:27 -05:00
Matt Mackall
6a7cb8cbaa diff: correctly handle combinations of whitespace options 2007-07-14 12:44:47 -05:00
Alexis S. L. Carvalho
e85eaa593d git patches: correct handling of filenames with spaces
Add a trailing TAB to the "--- filename" lines if there's a space
in the file name.  This allows patch(1) to work correctly.  The
same is done for diff --nodates.

This was originally suggested by Andrei Vermel, but at the time
I thought git was doing something different.
2007-06-22 19:06:04 -03:00
Alexis S. L. Carvalho
425cc6372f add mdiff.get_matching_blocks 2007-04-16 20:17:39 -03:00
Thomas Arendsen Hein
134efad44c merge with crew-stable 2007-02-20 20:55:23 +01:00
tailgunner@smtp.ru
5474a24e48 Don't lie that "binary file has changed"
Without -a option to "hg diff", mdiff.unidiff reported that "Binary
file foo has changed" without even trying to compare things. Now it
computes MD5 of old and new files, compares them and makes the conclusion.
2007-02-17 09:54:56 -02:00
Matt Mackall
f17a4e1934 Replace demandload with new demandimport 2006-12-13 13:27:09 -06:00
Stephen Darnell
a808384cf1 Add -D/--nodates options to hg diff/export that removes dates from diff headers
and replace uses of sed in the tests with --nodates.
2006-09-26 00:05:24 +01:00
Brendan Cully
619c7dab4b Remove dates from git export file lines - they confuse git-apply 2006-08-29 17:08:42 -07:00
Brendan Cully
c18265f47c Add diff --git option 2006-08-14 22:48:03 -07:00
Vadim Gelfer
13d751feaf refactor text diff/patch code.
rename commands.dodiff to patch.diff.
rename commands.doexport to patch.export.
move some functions from commands to new mercurial.cmdutil module.
turn list of diff options into mdiff.diffopts class.

patch.diff and patch.export now has clean api for call from 3rd party
python code.
2006-08-12 16:13:27 -07:00
Vadim Gelfer
dc377b58c1 update copyrights. 2006-08-12 12:30:02 -07:00
Haakon Riiser
7b06333d1a diff: add -b/-B options 2006-06-29 15:16:25 +02:00
Vadim Gelfer
9a0c813fdc use demandload more. 2006-06-20 23:58:21 -07:00
Vadim Gelfer
1de5bf52df fix speed regression in mdiff caused by line split bugfix. 2006-05-10 13:39:12 -07:00
Vadim Gelfer
c440466a54 fix diffs containing embedded "\r".
add test to make sure fix stays fixed.
2006-05-10 10:31:54 -07:00
mason@suse.com
492b52fda3 Fill in the uncompressed size during revlog.addgroup
This uses code from Matt to calculate the size change that
would result from applying a delta to keep an accurate running
total of the text size during revlog.addgroup
2006-04-04 16:38:44 -04:00
Thomas Arendsen Hein
ba28644c7c Fix diff against an empty file (issue124) and add a test for this. 2006-02-15 14:22:16 +01:00
mason@suse.com
7bc44b52d9 Add new bdiff based unidiff generation. 2006-01-24 15:02:10 +13:00
twaldmann@thinkmo.de
584aa09dd6 minor optimization: save some string trash 2005-11-14 02:30:19 +02:00
Matt Mackall
e2ec207d22 Remove now unused sortdiff and diff from mdiff 2005-10-25 22:17:31 -07:00
Matt Mackall
c155ce9cdc Clean up mdiff imports 2005-10-04 11:25:48 -07:00
Benoit Boissinot
e36bbe72ee make diff dates be epoch for add/remove 2005-10-04 11:21:48 -07:00
mpm@selenic.com
af3be1f6a1 Add automatic binary file detection to diff and export
Based on a patch by Fuming Wang

- add util.binary which decides whether a file is binary if it has any NUL
  characters in the first 1K.
- teach mdiff.unidiff to print "binary file <x> has changed" for binary files
- add text flag to cause unidiff and dodiff to treat all files as text
- add -a and --text flags (like diff(1)) to hg diff and export
- update docs
2005-08-23 19:58:46 -07:00
mpm@selenic.com
4394004b4a Remove all remaining print statements
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Remove all remaining print statements

Convert most prints to ui.warn or ui.write
Pass a write function into transactions

manifest hash: d1b0af7a344fc087a5acfe3ae87b782c20d043e0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCx1Q3ywK+sNU5EO8RAqSTAJwM5t/m+JOlf2ZXOjuItCSdFiubcwCdFm3G
HoicikSYpTgfCj2pIRfyLjo=
=Loqo
-----END PGP SIGNATURE-----
2005-07-02 18:57:59 -08:00
mpm@selenic.com
0fb5db6915 Whitespace cleanups
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Whitespace cleanups

manifest hash: ac954bc3a4f034c12638a259ecd65841f5b63c5c
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCwuubywK+sNU5EO8RAluIAJ98XQpNdZUpSmYKgDmrMRlbL76ZzQCfes0t
rknNUN/PhtyA4bzL646dOz4=
=UyCE
-----END PGP SIGNATURE-----
2005-06-29 10:42:35 -08:00
mpm@selenic.com
d2615cc70c Start using bdiff for generating deltas
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Start using bdiff for generating deltas

manifest hash: bf6ed7d17d96810b7f40b50811b104b568c64b4b
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCubqVywK+sNU5EO8RAor6AKCm8Zqg0DIhLzaMPp5/GKPKk/GjKwCfbCe+
/CBmpvcTxSJofY9RE08cCVY=
=2yu2
-----END PGP SIGNATURE-----
2005-06-22 11:23:01 -08:00
Thomas Arendsen Hein
878eebd88e Show revisions in diffs like CVS, based on a patch from Goffredo Baroncelli.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Show revisions in diffs like CVS, based on a patch from Goffredo Baroncelli.
Changes from the original patch:
- - Use 'diff -r ...' instead of 'hg diff -r ...' to support filetype detection
  by at least file(1) and vim.
- - Adjusted tests for this change.
- - Some cleanups.

manifest hash: 5f37d1ef75ea7f4e48b53f02371053ba54fb70f8
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCsyZzW7P1GVgWeRoRAqczAJ479lR9Z289sP+VH5L+N7pQRU14SACfUueq
88ABloIR3VyRIa4qbujnZio=
=Vva9
-----END PGP SIGNATURE-----
2005-06-17 20:37:23 +01:00
mpm@selenic.com
923df46e46 Fix another sortdiff cornercase
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Fix another sortdiff cornercase

manifest hash: 32b2d1750689c561c9471fb68a9f3571364399cb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCsL6AywK+sNU5EO8RAhaeAJ4zw18vo4oGTvymplKb7olKEeg0aQCfVxX1
2o/PcrE6EeboHpQn5E0Wb/Y=
=eENW
-----END PGP SIGNATURE-----
2005-06-15 15:49:20 -08:00
mpm@selenic.com
b51d9e3229 mdiff: fix the fix
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

mdiff: fix the fix

I saw you check in the thing back in but with another typo.

You check in "la < lenb", should be "la < lena".

So we are even :-)

Chris


manifest hash: 57157502250b0120bcc12a75a530d4c133673b39
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCrg5tywK+sNU5EO8RAvLPAKCOs76LKPniKHFa15YwzWWsNZ5/xACfesl3
WCiUjdeYUtU3jVKCEwmjAT0=
=+GFy
-----END PGP SIGNATURE-----
2005-06-13 14:53:33 -08:00
mpm@selenic.com
6ecc8916bc mdiff: reinstate new algorithm
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

mdiff: reinstate new algorithm

This unreverts the new algorithm with a fix from Chris (s/len/lena)
and adds some comments on what it's doing.

manifest hash: 75fc1acee1926e57d495f67a44cd88d9555f2356
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCrf4UywK+sNU5EO8RAoRzAKCA2vpUAGNqTkDeba3YHo6XXht7VgCfXQK0
/j5yv5cucnsYezCdclpftOA=
=FNMD
-----END PGP SIGNATURE-----
2005-06-13 13:43:48 -08:00
mpm@selenic.com
8f62e88ec1 mdiff: revert grouping optimization for the time being
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

mdiff: revert grouping optimization for the time being

This had trouble with Ted T'so import test while the original didn't.

manifest hash: e2fc49b5277096bd4c5081558af5efe9964d5310
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCrHzXywK+sNU5EO8RArocAJwKlxrnyVpdYaKzgJG/b4gSVOYBTwCgkl2t
zD807fsMULRDdDe1k9jVPcU=
=Iivz
-----END PGP SIGNATURE-----
2005-06-12 10:20:07 -08:00
mpm@selenic.com
1b72add8c7 hg commit: user and date options
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hg commit: user and date options

- From Ted Ts'o

manifest hash: f6ce29eed387664c6f0631b666158eb930876cb3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCrHx4ywK+sNU5EO8RAp/uAKCEGhvm1tpBJ9Bub8BlalWaIpMeqgCfUejo
IoevMbk4cjxQ5P3Zo2pSFs8=
=Ibp3
-----END PGP SIGNATURE-----
2005-06-12 10:18:32 -08:00
mpm@selenic.com
551154e610 unidiff: handle empty diffs more gracefully
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

unidiff: handle empty diffs more gracefully

manifest hash: e2030f7e55dc333ba0cd5b0847d1f1a08e3c5d64
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCpz0uywK+sNU5EO8RAnt4AJ9pyaS6/xNnlhCUocq3m0HbCwHJ/gCgrP/H
IvBJtq1eXvRedfitF25vBgw=
=pd5n
-----END PGP SIGNATURE-----
2005-06-08 10:47:10 -08:00
mpm@selenic.com
6fe3792f6b diff: use tab to separate date from filename
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

diff: use tab to separate date from filename

manifest hash: 73812de990e0e787320c11f7bd83c4ca91a52c4c
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCpdDxywK+sNU5EO8RAhKwAKCFcUa/p6ALbjoOl4I8VKJknZtu7gCdFvoE
HQn1iq4gnJoeurB7YLMRpqc=
=ltYP
-----END PGP SIGNATURE-----
2005-06-07 08:53:05 -08:00
mpm@selenic.com
d7c489168a Attempt to make diff deal with null sources properly
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Attempt to make diff deal with null sources properly

manifest hash: 7766ed2b885640157b93474b6e42573ec061fcfb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCpJsdywK+sNU5EO8RAr5gAJ9sIik+3FDyI8UvIvrWlku4QgMZWQCcDFvh
MvtqY8pFYTFLp7tM2zzTlu4=
=a0oy
-----END PGP SIGNATURE-----
2005-06-06 10:51:09 -08:00
mpm@selenic.com
f95bf8d95c import and startup cleanups
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

import and startup cleanups

add commands:run()
add copyright notice to commands
eliminate/reorganize imports to speed up start time:

0.5b:
$ time bash -c 'for i in `seq 100`; do ~/bin/hg > /dev/null; done'

real    0m7.718s
user    0m6.719s
sys     0m0.794s

new:

$ time bash -c 'for i in `seq 100`; do hg > /dev/null; done'
real    0m2.171s
user    0m1.684s
sys     0m0.444s

just python:

$ time bash -c 'for i in `seq 100`; do python -c pass; done'
real    0m0.988s
user    0m0.771s
sys     0m0.207s

Ignoring the fixed cost of loading the Python interpreter, we're 5.6
times faster. With the Python load time, we're still 3.5 times faster.

manifest hash: acce5882a55c76eb165316f5741724c8ce4ef587
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCoihAywK+sNU5EO8RAqMdAJwMe6Ur0R9G6jjayNa5hH2C3c4k/gCeIYvc
N178vaWWGciX9zq+g5qCAls=
=buhv
-----END PGP SIGNATURE-----
2005-06-04 14:16:32 -08:00
mpm@selenic.com
9fec0c0d80 mdiff.py: kill #! line, add copyright notice
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

mdiff.py: kill #! line, add copyright notice

manifest hash: acb4e14d5947d0fde5b89a874af0476773ee1cee
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCoM9CywK+sNU5EO8RAizVAJ41dqQxxx8nouBxJMcFmoVRRo4GfACbB9RV
Xc0cqaoPVL7p87opPKjgNWw=
=HyjH
-----END PGP SIGNATURE-----
2005-06-03 13:44:34 -08:00
mpm@selenic.com
b43cebfe40 Improved binary diff from Christopher Li
This is more intelligent/efficient by combining neighboring inserts,
replaces and deletes. Passes test of converting kernel repo, but
doesn't appear to substantially affect compression or performance.
2005-05-27 19:38:34 -08:00
mpm@selenic.com
59375bb06a hg diff: fix missing final newline bug 2005-05-26 13:02:28 -08:00
mpm@selenic.com
a264d87bbd Fix braindamaged import in mdiff. 2005-05-20 19:19:25 -08:00
mpm@selenic.com
36152aee36 Remove python version of the patches code 2005-05-20 17:49:25 -08:00
mpm@selenic.com
4e35c669ab Add a function to return the new text from a binary diff 2005-05-20 17:42:29 -08:00
mpm@selenic.com
8dcd538ef7 Fix a bug in patches() if there's not text and no patch 2005-05-17 00:32:18 -08:00
mpm@selenic.com
f161c8bdc8 Add an O(m + nlog n) patching extension 2005-05-16 22:08:33 -08:00
mpm@selenic.com
e56388d1b4 Add mdiff.patches to speed up applying thousands of patches to the manifest 2005-05-14 10:27:14 -08:00
mpm@selenic.com
264f689db9 Diff in subdirectories from Jake Edge
Dates in diff
Fix O(n^2) behaviour of manifest diff
Add a/ and b/ to work with patch -p1
2005-05-12 17:54:55 -08:00
mpm@selenic.com
e10ce18d5b unidiff: punt on comparing empty files 2005-05-07 16:10:50 -08:00
mpm@selenic.com
ca8cb8ba67 Add back links from file revisions to changeset revisions
Add simple transaction support
Add hg verify
Improve caching in revlog
Fix a bunch of bugs
Self-hosting now that the metadata is close to finalized
2005-05-03 13:16:10 -08:00