Show More
@@ -27,11 +27,10 b' import struct, zlib, errno' | |||||
27 | REVLOGV0 = 0 |
|
27 | REVLOGV0 = 0 | |
28 | REVLOGNG = 1 |
|
28 | REVLOGNG = 1 | |
29 | REVLOGNGINLINEDATA = (1 << 16) |
|
29 | REVLOGNGINLINEDATA = (1 << 16) | |
30 | REVLOGSHALLOW = (1 << 17) |
|
|||
31 | REVLOG_DEFAULT_FLAGS = REVLOGNGINLINEDATA |
|
30 | REVLOG_DEFAULT_FLAGS = REVLOGNGINLINEDATA | |
32 | REVLOG_DEFAULT_FORMAT = REVLOGNG |
|
31 | REVLOG_DEFAULT_FORMAT = REVLOGNG | |
33 | REVLOG_DEFAULT_VERSION = REVLOG_DEFAULT_FORMAT | REVLOG_DEFAULT_FLAGS |
|
32 | REVLOG_DEFAULT_VERSION = REVLOG_DEFAULT_FORMAT | REVLOG_DEFAULT_FLAGS | |
34 |
REVLOGNG_FLAGS = REVLOGNGINLINEDATA |
|
33 | REVLOGNG_FLAGS = REVLOGNGINLINEDATA | |
35 |
|
34 | |||
36 | # revlog index flags |
|
35 | # revlog index flags | |
37 | REVIDX_KNOWN_FLAGS = 0 |
|
36 | REVIDX_KNOWN_FLAGS = 0 | |
@@ -207,7 +206,7 b' class revlog(object):' | |||||
207 | remove data, and can use some simple techniques to avoid the need |
|
206 | remove data, and can use some simple techniques to avoid the need | |
208 | for locking while reading. |
|
207 | for locking while reading. | |
209 | """ |
|
208 | """ | |
210 |
def __init__(self, opener, indexfile |
|
209 | def __init__(self, opener, indexfile): | |
211 | """ |
|
210 | """ | |
212 | create a revlog object |
|
211 | create a revlog object | |
213 |
|
212 | |||
@@ -220,7 +219,6 b' class revlog(object):' | |||||
220 | self._cache = None |
|
219 | self._cache = None | |
221 | self._chunkcache = (0, '') |
|
220 | self._chunkcache = (0, '') | |
222 | self.index = [] |
|
221 | self.index = [] | |
223 | self._shallowroot = shallowroot |
|
|||
224 | self._pcache = {} |
|
222 | self._pcache = {} | |
225 | self._nodecache = {nullid: nullrev} |
|
223 | self._nodecache = {nullid: nullrev} | |
226 | self._nodepos = None |
|
224 | self._nodepos = None | |
@@ -231,9 +229,6 b' class revlog(object):' | |||||
231 | if v & REVLOGNG: |
|
229 | if v & REVLOGNG: | |
232 | v |= REVLOGNGINLINEDATA |
|
230 | v |= REVLOGNGINLINEDATA | |
233 |
|
231 | |||
234 | if shallowroot: |
|
|||
235 | v |= REVLOGSHALLOW |
|
|||
236 |
|
||||
237 | i = '' |
|
232 | i = '' | |
238 | try: |
|
233 | try: | |
239 | f = self.opener(self.indexfile) |
|
234 | f = self.opener(self.indexfile) | |
@@ -247,7 +242,6 b' class revlog(object):' | |||||
247 |
|
242 | |||
248 | self.version = v |
|
243 | self.version = v | |
249 | self._inline = v & REVLOGNGINLINEDATA |
|
244 | self._inline = v & REVLOGNGINLINEDATA | |
250 | self._shallow = v & REVLOGSHALLOW |
|
|||
251 | flags = v & ~0xFFFF |
|
245 | flags = v & ~0xFFFF | |
252 | fmt = v & 0xFFFF |
|
246 | fmt = v & 0xFFFF | |
253 | if fmt == REVLOGV0 and flags: |
|
247 | if fmt == REVLOGV0 and flags: |
General Comments 0
You need to be logged in to leave comments.
Login now