equal
deleted
inserted
replaced
6 # GNU General Public License version 2 or any later version. |
6 # GNU General Public License version 2 or any later version. |
7 |
7 |
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 ) |
15 |
14 |
16 def readtransform(self, text): |
15 def readtransform(self, text): |
27 |
26 |
28 def setup(): |
27 def setup(): |
29 # We just wanted to add the flag processor, which is done at module |
28 # We just wanted to add the flag processor, which is done at module |
30 # load time. |
29 # load time. |
31 pass |
30 pass |
32 |
|
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 |
31 |
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): |
44 # Renames that come from outside the narrowspec are |
35 # Renames that come from outside the narrowspec are |