##// END OF EJS Templates
narrow: move manifestlog overrides to core...
Martin von Zweigbergk -
r37392:ac42e39b default
parent child Browse files
Show More
@@ -50,12 +50,6 b' def wraprepo(repo):'
50
50
51 class narrowrepository(repo.__class__):
51 class narrowrepository(repo.__class__):
52
52
53 @cacheprop('00manifest.i')
54 def manifestlog(self):
55 mfl = super(narrowrepository, self).manifestlog
56 narrowrevlog.makenarrowmanifestlog(mfl, self)
57 return mfl
58
59 def file(self, f):
53 def file(self, f):
60 fl = super(narrowrepository, self).file(f)
54 fl = super(narrowrepository, self).file(f)
61 narrowrevlog.makenarrowfilelog(fl, self.narrowmatch())
55 narrowrevlog.makenarrowfilelog(fl, self.narrowmatch())
@@ -8,7 +8,6 b''
8 from __future__ import absolute_import
8 from __future__ import absolute_import
9
9
10 from mercurial import (
10 from mercurial import (
11 manifest,
12 revlog,
11 revlog,
13 util,
12 util,
14 )
13 )
@@ -30,14 +29,6 b' def setup():'
30 # load time.
29 # load time.
31 pass
30 pass
32
31
33 def makenarrowmanifestlog(mfl, repo):
34 class narrowmanifestlog(mfl.__class__):
35 def get(self, dir, node, verify=True):
36 if not repo.narrowmatch().visitdir(dir[:-1] or '.'):
37 return manifest.excludeddirmanifestctx(dir, node)
38 return super(narrowmanifestlog, self).get(dir, node, verify=verify)
39 mfl.__class__ = narrowmanifestlog
40
41 def makenarrowfilelog(fl, narrowmatch):
32 def makenarrowfilelog(fl, narrowmatch):
42 class narrowfilelog(fl.__class__):
33 class narrowfilelog(fl.__class__):
43 def renamed(self, node):
34 def renamed(self, node):
@@ -1303,6 +1303,9 b' class manifestlog(object):'
1303 if node in self._dirmancache.get(dir, ()):
1303 if node in self._dirmancache.get(dir, ()):
1304 return self._dirmancache[dir][node]
1304 return self._dirmancache[dir][node]
1305
1305
1306 if not self._narrowmatch.always():
1307 if not self._narrowmatch.visitdir(dir[:-1] or '.'):
1308 return excludeddirmanifestctx(dir, node)
1306 if dir:
1309 if dir:
1307 if self._revlog._treeondisk:
1310 if self._revlog._treeondisk:
1308 if verify:
1311 if verify:
General Comments 0
You need to be logged in to leave comments. Login now