equal
deleted
inserted
replaced
309 Both pieces of the revlog are written to in an append-only |
309 Both pieces of the revlog are written to in an append-only |
310 fashion, which means we never need to rewrite a file to insert or |
310 fashion, which means we never need to rewrite a file to insert or |
311 remove data, and can use some simple techniques to avoid the need |
311 remove data, and can use some simple techniques to avoid the need |
312 for locking while reading. |
312 for locking while reading. |
313 """ |
313 """ |
314 def __init__(self, opener, indexfile, defversion=REVLOG_DEFAULT_VERSION): |
314 def __init__(self, opener, indexfile): |
315 """ |
315 """ |
316 create a revlog object |
316 create a revlog object |
317 |
317 |
318 opener is a function that abstracts the file opening operation |
318 opener is a function that abstracts the file opening operation |
319 and can be used to implement COW semantics or the like. |
319 and can be used to implement COW semantics or the like. |
323 self.opener = opener |
323 self.opener = opener |
324 |
324 |
325 self.indexstat = None |
325 self.indexstat = None |
326 self.cache = None |
326 self.cache = None |
327 self.chunkcache = None |
327 self.chunkcache = None |
328 self.defversion = defversion |
328 self.defversion=REVLOG_DEFAULT_VERSION |
|
329 if hasattr(opener, "defversion"): |
|
330 self.defversion = opener.defversion |
329 self.load() |
331 self.load() |
330 |
332 |
331 def load(self): |
333 def load(self): |
332 v = self.defversion |
334 v = self.defversion |
333 try: |
335 try: |