Commit Graph

18 Commits

Author SHA1 Message Date
Yuya Nishihara
720bf3b0d8 cffi: split modules from pure
The copyright lines are updated per change history.

cffi/osutil.py isn't tested since I have no access to OS X machine right now,
sorry.
2017-05-02 21:15:31 +09:00
Yuya Nishihara
fa3c51ef73 cffi: put compiled modules into mercurial.cffi package
Don't pollute the top-level namespace.
2017-05-02 21:08:38 +09:00
Yuya Nishihara
5fe7742660 mpatch: switch to policy importer 2016-08-13 12:18:58 +09:00
Maciej Fijalkowski
c98b11e3dd mpatch: write a cffi version of mpatch.patches 2016-07-25 15:10:52 +02:00
timeless
f77cdcd3b1 pycompat: switch to util.stringio for py3 compat 2016-04-10 20:55:37 +00:00
timeless
4fca2b2f02 mpatch: unify mpatchError (issue5182)
The pure version was mpatch was throwing struct.error or ValueError
for errors, whereas the C version was throwing an "mpatch.mpatchError".

Introducing an mpatch.mpatchError into pure and using it consistently
is fairly easy, but the actual form for it is mercurial.mpatch.mpatchError,
so with this commit, we change the C implementation to match the naming
convention too.
2016-03-31 02:05:28 +00:00
Augie Fackler
7347261bf4 mpatch: move collect() to module level
This helps the code read a little more clearly.
2016-03-19 16:45:52 -04:00
Augie Fackler
4f3e191469 mpatch: un-nest the move() method
This helps the code read a little more clearly.
2016-03-19 16:43:16 -04:00
Augie Fackler
ff76ed3734 mpatch: move pull() method to top level
There was no need for this to be nested.
2016-03-19 16:37:30 -04:00
Gregory Szorc
132a5b6d98 mpatch: use absolute_import
While I was here, I removed the try..except around importing cStringIO
because cStringIO should always be importable on modern Python versions.
We already do an unconditional import in other files.
2015-12-12 13:37:56 -05:00
Brodie Rao
d6a6abf2b0 cleanup: eradicate long lines 2012-05-12 15:54:54 +02:00
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
Matt Mackall
f37d605b14 clean up remaining generic exceptions 2010-05-07 16:59:00 -05: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
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02: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
203d953203 pure Python implementation of mpatch.c 2009-01-24 00:12:17 +01:00