Mercurial > hg
comparison hgext/narrow/narrowrepo.py @ 37380:c3c76194f0c1
narrow: remove unused "cacheprop" stuff
This is unused since D3046. I didn't even notice it then, but tests
still pass so I hope it's still handled safely.
Differential Revision: https://phab.mercurial-scm.org/D3142
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 05 Apr 2018 12:36:44 -0700 |
parents | ac42e39b1b77 |
children | 1cba497491be |
comparison
equal
deleted
inserted
replaced
37379:24c7428983c5 | 37380:c3c76194f0c1 |
---|---|
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 bundlerepo, | |
12 changegroup, | 11 changegroup, |
13 hg, | 12 hg, |
14 localrepo, | |
15 narrowspec, | 13 narrowspec, |
16 scmutil, | 14 scmutil, |
17 ) | 15 ) |
18 | 16 |
19 from . import ( | 17 from . import ( |
38 return orig(ui, repo, repopath) | 36 return orig(ui, repo, repopath) |
39 | 37 |
40 def wraprepo(repo): | 38 def wraprepo(repo): |
41 """Enables narrow clone functionality on a single local repository.""" | 39 """Enables narrow clone functionality on a single local repository.""" |
42 | 40 |
43 cacheprop = localrepo.storecache | |
44 if isinstance(repo, bundlerepo.bundlerepository): | |
45 # We have to use a different caching property decorator for | |
46 # bundlerepo because storecache blows up in strange ways on a | |
47 # bundlerepo. Fortunately, there's no risk of data changing in | |
48 # a bundlerepo. | |
49 cacheprop = lambda name: localrepo.unfilteredpropertycache | |
50 | |
51 class narrowrepository(repo.__class__): | 41 class narrowrepository(repo.__class__): |
52 | 42 |
53 def file(self, f): | 43 def file(self, f): |
54 fl = super(narrowrepository, self).file(f) | 44 fl = super(narrowrepository, self).file(f) |
55 narrowrevlog.makenarrowfilelog(fl, self.narrowmatch()) | 45 narrowrevlog.makenarrowfilelog(fl, self.narrowmatch()) |