Show More
@@ -896,18 +896,34 b' class manifestrevlog(revlog.revlog):' | |||
|
896 | 896 | '''A revlog that stores manifest texts. This is responsible for caching the |
|
897 | 897 | full-text manifest contents. |
|
898 | 898 | ''' |
|
899 |
def __init__(self, opener, |
|
|
900 | super(manifestrevlog, self).__init__(opener, indexfile) | |
|
901 | ||
|
899 | def __init__(self, opener, dir=''): | |
|
902 | 900 | # During normal operations, we expect to deal with not more than four |
|
903 | 901 | # revs at a time (such as during commit --amend). When rebasing large |
|
904 | 902 | # stacks of commits, the number can go up, hence the config knob below. |
|
905 | 903 | cachesize = 4 |
|
904 | usetreemanifest = False | |
|
905 | usemanifestv2 = False | |
|
906 | 906 | opts = getattr(opener, 'options', None) |
|
907 | 907 | if opts is not None: |
|
908 | 908 | cachesize = opts.get('manifestcachesize', cachesize) |
|
909 | usetreemanifest = opts.get('treemanifest', usetreemanifest) | |
|
910 | usemanifestv2 = opts.get('manifestv2', usemanifestv2) | |
|
911 | ||
|
912 | self._treeondisk = usetreemanifest | |
|
913 | self._usemanifestv2 = usemanifestv2 | |
|
914 | ||
|
909 | 915 | self._fulltextcache = util.lrucachedict(cachesize) |
|
910 | 916 | |
|
917 | indexfile = "00manifest.i" | |
|
918 | if dir: | |
|
919 | assert self._treeondisk, 'opts is %r' % opts | |
|
920 | if not dir.endswith('/'): | |
|
921 | dir = dir + '/' | |
|
922 | indexfile = "meta/" + dir + "00manifest.i" | |
|
923 | self._dir = dir | |
|
924 | ||
|
925 | super(manifestrevlog, self).__init__(opener, indexfile) | |
|
926 | ||
|
911 | 927 | @property |
|
912 | 928 | def fulltextcache(self): |
|
913 | 929 | return self._fulltextcache |
@@ -1093,24 +1109,13 b' class manifest(manifestrevlog):' | |||
|
1093 | 1109 | # stacks of commits, the number can go up, hence the config knob below. |
|
1094 | 1110 | cachesize = 4 |
|
1095 | 1111 | usetreemanifest = False |
|
1096 | usemanifestv2 = False | |
|
1097 | 1112 | opts = getattr(opener, 'options', None) |
|
1098 | 1113 | if opts is not None: |
|
1099 | 1114 | cachesize = opts.get('manifestcachesize', cachesize) |
|
1100 | 1115 | usetreemanifest = opts.get('treemanifest', usetreemanifest) |
|
1101 | usemanifestv2 = opts.get('manifestv2', usemanifestv2) | |
|
1102 | 1116 | self._mancache = util.lrucachedict(cachesize) |
|
1103 | 1117 | self._treeinmem = usetreemanifest |
|
1104 | self._treeondisk = usetreemanifest | |
|
1105 | self._usemanifestv2 = usemanifestv2 | |
|
1106 | indexfile = "00manifest.i" | |
|
1107 | if dir: | |
|
1108 | assert self._treeondisk, 'opts is %r' % opts | |
|
1109 | if not dir.endswith('/'): | |
|
1110 | dir = dir + '/' | |
|
1111 | indexfile = "meta/" + dir + "00manifest.i" | |
|
1112 | super(manifest, self).__init__(opener, indexfile) | |
|
1113 | self._dir = dir | |
|
1118 | super(manifest, self).__init__(opener, dir=dir) | |
|
1114 | 1119 | # The dirlogcache is kept on the root manifest log |
|
1115 | 1120 | if dir: |
|
1116 | 1121 | self._dirlogcache = dirlogcache |
General Comments 0
You need to be logged in to leave comments.
Login now