Dan Villiom Podlaski Christiansen
5ae771a2fc
pure mpatch: avoid using list.insert(0, ...)
...
In Python lists are implemented as arrays with overallocation. As a
result, list.insert(0, ...) is O(n), whereas list.append() has an
amortised running time of O(1). Reversing the internal representation
of the list should cause a slight speedup for pure Python builds.
2011-04-30 15:05:34 +02:00
Alexander Solovyov
0eb3836642
remove unused imports and variables
2011-04-30 13:59:14 +02:00
Wagner Bruna
da9841899b
pure: fix index parsing on empty repositories
2011-02-17 13:37:52 -02:00
Matt Mackall
3d98b5db9a
pure: update index parsing
2011-01-12 13:54:39 -06:00
Matt Mackall
efaaee2894
revlog: remove lazy index
2011-01-04 14:12:52 -06:00
Brodie Rao
7362459729
cleanup: use x in (a, b) instead of x == a or x == b
2010-09-23 00:02:31 -05:00
Matt Mackall
f37d605b14
clean up remaining generic exceptions
2010-05-07 16:59:00 -05:00
Benoit Boissinot
3db7df2869
style: use consistent variable names (*mod) with imports which would shadow
2010-03-11 17:43:44 +01:00
Benoit Boissinot
e58438a035
fix test-mq-eol under --pure (mimic diffhelper.c behaviour)
...
bug discovered by apycot (apycot.hg-scm.org)
2010-02-26 16:52:43 +01:00
Matt Mackall
8d99be19f0
many, many trivial check-code fixups
2010-01-25 00:05:27 -06:00
Matt Mackall
595d66f424
Update license to GPLv2+
2010-01-19 22:20:08 -06:00
Alejandro Santos
77d606ac51
compat: use open() instead of file() everywhere
2009-07-05 11:01:30 +02:00
Alejandro Santos
3183e52503
compat: use // for integer division
2009-07-05 11:00:44 +02: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
Sune Foldager
adc90b2605
posixfile: remove posixfile_nt and fix import bug in windows.py
...
The posixfile_nt class has been superseded by posixfile in osutils.c,
which works on Windows NT and above. All other systems get the regular
python file class which is assigned to posixfile in posix.py (for POSIX)
and in the pure python version of osutils.py (for Win 9x or Windows NT
in pure mode).
2009-05-13 21:36:16 +02:00
Martin Geisler
59adad78ff
pure/osutil: add copyright and license header
2009-04-26 01:57:12 +02:00
Martin Geisler
750183bdad
updated license to be explicit about GPL version 2
2009-04-26 01:08:54 +02:00
Matt Mackall
019a0b138e
pure/parsers: fix circular imports, import mercurial modules properly
2009-04-03 12:37:38 -05:00
Matt Mackall
c36ce7ba2b
pure/bdiff: fix circular import
2009-04-03 12:37:30 -05:00
Dirkjan Ochtman
7b5b0945c3
kill another trailing space
2009-03-23 13:49:16 +01:00
Peter Arrenbrecht
bc21361ed2
cleanup: drop unused imports
2009-03-23 13:12:07 +01:00
Mads Kiilerich
e39fe5275e
Optimization of pure.base85.b85encode
...
This makes pure python base85 encoding 3x faster than before. Now it is only
40x slower than the C version.
2009-03-04 23:23:59 +01:00
Martin Geisler
0c5c608631
pure/mpatch: use StringIO instead of mmap (issue1493)
...
This is more portable than memory mapping /dev/zero: Windows obviously
does not have /dev/zero and mapping /dev/zero failed on Mac OS X.
2009-02-16 00:09:47 +01:00
Martin Geisler
1c820b3f61
move mercurial.osutil to mercurial.pure.osutil
2009-01-24 00:13:49 +01:00
Martin Geisler
06c9d07d91
pure Python implementation of bdiff.c
2009-01-24 00:12:20 +01:00
Martin Geisler
acbc15eded
pure Python implementation of diffhelpers.c
2009-01-24 00:12:19 +01:00
Brendan Cully
6cdf9dd11f
Pure python base85 fallback
...
Encoding takes about 100x longer than native on a large binary.
2008-12-30 18:58:58 -08:00
Martin Geisler
00f6dbb2f7
pure Python implementation of parsers.c
2009-01-24 00:12:18 +01:00
Martin Geisler
203d953203
pure Python implementation of mpatch.c
2009-01-24 00:12:17 +01:00