equal
deleted
inserted
replaced
9 |
9 |
10 from mercurial import ( |
10 from mercurial import ( |
11 extensions, |
11 extensions, |
12 hg, |
12 hg, |
13 scmutil, |
13 scmutil, |
14 ui, |
14 ui as uimod, |
15 util, |
15 util, |
16 ) |
16 ) |
17 |
17 |
18 filecache = scmutil.filecache |
18 filecache = scmutil.filecache |
19 |
19 |
139 util.cachestat.__init__ = originit |
139 util.cachestat.__init__ = originit |
140 |
140 |
141 def test_filecache_synced(): |
141 def test_filecache_synced(): |
142 # test old behavior that caused filecached properties to go out of sync |
142 # test old behavior that caused filecached properties to go out of sync |
143 os.system('hg init && echo a >> a && hg ci -qAm.') |
143 os.system('hg init && echo a >> a && hg ci -qAm.') |
144 repo = hg.repository(ui.ui()) |
144 repo = hg.repository(uimod.ui()) |
145 # first rollback clears the filecache, but changelog to stays in __dict__ |
145 # first rollback clears the filecache, but changelog to stays in __dict__ |
146 repo.rollback() |
146 repo.rollback() |
147 repo.commit('.') |
147 repo.commit('.') |
148 # second rollback comes along and touches the changelog externally |
148 # second rollback comes along and touches the changelog externally |
149 # (file is moved) |
149 # (file is moved) |