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, datafile, |
314 def __init__(self, opener, indexfile, defversion=REVLOG_DEFAULT_VERSION): |
315 defversion=REVLOG_DEFAULT_VERSION): |
|
316 """ |
315 """ |
317 create a revlog object |
316 create a revlog object |
318 |
317 |
319 opener is a function that abstracts the file opening operation |
318 opener is a function that abstracts the file opening operation |
320 and can be used to implement COW semantics or the like. |
319 and can be used to implement COW semantics or the like. |
321 """ |
320 """ |
322 self.indexfile = indexfile |
321 self.indexfile = indexfile |
323 self.datafile = datafile |
322 self.datafile = indexfile[:-2] + ".d" |
324 self.opener = opener |
323 self.opener = opener |
325 |
324 |
326 self.indexstat = None |
325 self.indexstat = None |
327 self.cache = None |
326 self.cache = None |
328 self.chunkcache = None |
327 self.chunkcache = None |