Show More
@@ -42,6 +42,15 b' class filelog:' | |||
|
42 | 42 | opts = opener.options |
|
43 | 43 | self._fix_issue6528 = opts.get(b'issue6528.fix-incoming', True) |
|
44 | 44 | |
|
45 | def get_revlog(self): | |
|
46 | """return an actual revlog instance if any | |
|
47 | ||
|
48 | This exist because a lot of code leverage the fact the underlying | |
|
49 | storage is a revlog for optimization, so giving simple way to access | |
|
50 | the revlog instance helps such code. | |
|
51 | """ | |
|
52 | return self._revlog | |
|
53 | ||
|
45 | 54 | def __len__(self): |
|
46 | 55 | return len(self._revlog) |
|
47 | 56 |
@@ -1404,6 +1404,14 b' class imanifeststorage(interfaceutil.Int' | |||
|
1404 | 1404 | This one behaves the same way, except for manifest data. |
|
1405 | 1405 | """ |
|
1406 | 1406 | |
|
1407 | def get_revlog(): | |
|
1408 | """return an actual revlog instance if any | |
|
1409 | ||
|
1410 | This exist because a lot of code leverage the fact the underlying | |
|
1411 | storage is a revlog for optimization, so giving simple way to access | |
|
1412 | the revlog instance helps such code. | |
|
1413 | """ | |
|
1414 | ||
|
1407 | 1415 | |
|
1408 | 1416 | class imanifestlog(interfaceutil.Interface): |
|
1409 | 1417 | """Interface representing a collection of manifest snapshots. |
@@ -1617,6 +1617,15 b' class manifestrevlog:' | |||
|
1617 | 1617 | self.index = self._revlog.index |
|
1618 | 1618 | self._generaldelta = self._revlog._generaldelta |
|
1619 | 1619 | |
|
1620 | def get_revlog(self): | |
|
1621 | """return an actual revlog instance if any | |
|
1622 | ||
|
1623 | This exist because a lot of code leverage the fact the underlying | |
|
1624 | storage is a revlog for optimization, so giving simple way to access | |
|
1625 | the revlog instance helps such code. | |
|
1626 | """ | |
|
1627 | return self._revlog | |
|
1628 | ||
|
1620 | 1629 | def _setupmanifestcachehooks(self, repo): |
|
1621 | 1630 | """Persist the manifestfulltextcache on lock release""" |
|
1622 | 1631 | if not util.safehasattr(repo, '_wlockref'): |
@@ -663,6 +663,10 b' class revlog:' | |||
|
663 | 663 | # revlog header -> revlog compressor |
|
664 | 664 | self._decompressors = {} |
|
665 | 665 | |
|
666 | def get_revlog(self): | |
|
667 | """simple function to mirror API of other not-really-revlog API""" | |
|
668 | return self | |
|
669 | ||
|
666 | 670 | @util.propertycache |
|
667 | 671 | def revlog_kind(self): |
|
668 | 672 | return self.target[0] |
General Comments 0
You need to be logged in to leave comments.
Login now