Show More
@@ -7,16 +7,18 b' regression."""' | |||
|
7 | 7 | from __future__ import absolute_import, print_function |
|
8 | 8 | import os |
|
9 | 9 | import subprocess |
|
10 | import mercurial.localrepo | |
|
11 | import mercurial.util | |
|
12 | import mercurial.hg | |
|
13 | import mercurial.ui as uimod | |
|
14 | 10 | |
|
11 | from mercurial import ( | |
|
12 | hg, | |
|
13 | localrepo, | |
|
14 | ui as uimod, | |
|
15 | util, | |
|
16 | ) | |
|
15 | 17 | |
|
16 | 18 | # create some special property cache that trace they call |
|
17 | 19 | |
|
18 | 20 | calllog = [] |
|
19 |
@ |
|
|
21 | @util.propertycache | |
|
20 | 22 | def testcachedfoobar(repo): |
|
21 | 23 | name = repo.filtername |
|
22 | 24 | if name is None: |
@@ -26,7 +28,7 b' def testcachedfoobar(repo):' | |||
|
26 | 28 | return val |
|
27 | 29 | |
|
28 | 30 | unficalllog = [] |
|
29 |
@ |
|
|
31 | @localrepo.unfilteredpropertycache | |
|
30 | 32 | def testcachedunfifoobar(repo): |
|
31 | 33 | name = repo.filtername |
|
32 | 34 | if name is None: |
@@ -36,8 +38,8 b' def testcachedunfifoobar(repo):' | |||
|
36 | 38 | return val |
|
37 | 39 | |
|
38 | 40 | #plug them on repo |
|
39 |
|
|
|
40 |
|
|
|
41 | localrepo.localrepository.testcachedfoobar = testcachedfoobar | |
|
42 | localrepo.localrepository.testcachedunfifoobar = testcachedunfifoobar | |
|
41 | 43 | |
|
42 | 44 | |
|
43 | 45 | # Create an empty repo and instantiate it. It is important to run |
@@ -45,7 +47,7 b' mercurial.localrepo.localrepository.test' | |||
|
45 | 47 | repopath = os.path.join(os.environ['TESTTMP'], 'repo') |
|
46 | 48 | assert subprocess.call(['hg', 'init', repopath]) == 0 |
|
47 | 49 | ui = uimod.ui() |
|
48 |
repo = |
|
|
50 | repo = hg.repository(ui, path=repopath).unfiltered() | |
|
49 | 51 | |
|
50 | 52 | |
|
51 | 53 | print('') |
General Comments 0
You need to be logged in to leave comments.
Login now