Mercurial > hg
comparison mercurial/pure/mpatch.py @ 32371:151cc3b3d799
mpatch: switch to policy importer
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 13 Aug 2016 12:18:58 +0900 |
parents | f2846d546645 |
children | 2dcb3d52ef41 |
comparison
equal
deleted
inserted
replaced
32370:017ad85e5ac8 | 32371:151cc3b3d799 |
---|---|
7 | 7 |
8 from __future__ import absolute_import | 8 from __future__ import absolute_import |
9 | 9 |
10 import struct | 10 import struct |
11 | 11 |
12 from . import policy, pycompat | 12 from .. import policy, pycompat |
13 stringio = pycompat.stringio | 13 stringio = pycompat.stringio |
14 modulepolicy = policy.policy | 14 modulepolicy = policy.policy |
15 policynocffi = policy.policynocffi | 15 policynocffi = policy.policynocffi |
16 | 16 |
17 class mpatchError(Exception): | 17 class mpatchError(Exception): |
165 lib.mpatch_lfree(patch) | 165 lib.mpatch_lfree(patch) |
166 raise mpatchError("error applying patches") | 166 raise mpatchError("error applying patches") |
167 res = ffi.buffer(buf, outlen)[:] | 167 res = ffi.buffer(buf, outlen)[:] |
168 lib.mpatch_lfree(patch) | 168 lib.mpatch_lfree(patch) |
169 return res | 169 return res |
170 |