##// END OF EJS Templates
filelog: drop index attribute (API)...
filelog: drop index attribute (API) The previous commit removed the last consumer of the "index" attribute on the file storage interface. The index is an extremely low-level data structure that is revlog specific and isn't appropriate to expose as part of a generic storage API. There may be a market for an efficient data structure to obtain metadata on every revision for a file. But if there is, it should be designed using e.g. named attributes for lookup instead of a list-like of 8-tuples. Let's drop the attribute from filelog and remove the attribute from the file storage interface. Differential Revision: https://phab.mercurial-scm.org/D4720

File last commit:

r32506:2dcb3d52 default
r39896:d9b3cc3d default
Show More
bdiffbuild.py
32 lines | 773 B | text/x-python | PythonLexer
Yuya Nishihara
cffi: rename build scripts...
r32505 from __future__ import absolute_import
import cffi
import os
ffi = cffi.FFI()
Augie Fackler
cleanup: fix some latent open(path).read() et al calls we previously missed...
r36966 with open(os.path.join(os.path.join(os.path.dirname(__file__), '..'),
'bdiff.c')) as f:
ffi.set_source("mercurial.cffi._bdiff",
f.read(), include_dirs=['mercurial'])
Yuya Nishihara
cffi: rename build scripts...
r32505 ffi.cdef("""
struct bdiff_line {
int hash, n, e;
ssize_t len;
const char *l;
};
struct bdiff_hunk;
struct bdiff_hunk {
int a1, a2, b1, b2;
struct bdiff_hunk *next;
};
int bdiff_splitlines(const char *a, ssize_t len, struct bdiff_line **lr);
int bdiff_diff(struct bdiff_line *a, int an, struct bdiff_line *b, int bn,
struct bdiff_hunk *base);
void bdiff_freehunks(struct bdiff_hunk *l);
void free(void*);
""")
if __name__ == '__main__':
ffi.compile()