tests/test-filecache.py
changeset 28803 76c091f9711e
parent 28802 b16eacf5347c
child 29995 57830bd0e787
equal deleted inserted replaced
28802:b16eacf5347c 28803:76c091f9711e
     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)