Show More
@@ -10,25 +10,30 b" if subprocess.call(['python', '%s/hghave" | |||
|
10 | 10 | from mercurial import ( |
|
11 | 11 | extensions, |
|
12 | 12 | hg, |
|
13 | scmutil, | |
|
13 | localrepo, | |
|
14 | 14 | ui as uimod, |
|
15 | 15 | util, |
|
16 | 16 | vfs as vfsmod, |
|
17 | 17 | ) |
|
18 | 18 | |
|
19 | filecache = scmutil.filecache | |
|
20 | ||
|
21 | 19 | class fakerepo(object): |
|
22 | 20 | def __init__(self): |
|
23 | 21 | self._filecache = {} |
|
24 | 22 | |
|
25 | def join(self, p): | |
|
26 | return p | |
|
23 | class fakevfs(object): | |
|
24 | ||
|
25 | def join(self, p): | |
|
26 | return p | |
|
27 | ||
|
28 | vfs = fakevfs() | |
|
29 | ||
|
30 | def unfiltered(self): | |
|
31 | return self | |
|
27 | 32 | |
|
28 | 33 | def sjoin(self, p): |
|
29 | 34 | return p |
|
30 | 35 | |
|
31 | @filecache('x', 'y') | |
|
36 | @localrepo.repofilecache('x', 'y') | |
|
32 | 37 | def cached(self): |
|
33 | 38 | print('creating') |
|
34 | 39 | return 'string from function' |
General Comments 0
You need to be logged in to leave comments.
Login now