Mercurial > public > mercurial-scm > hg-stable
diff tests/test-commandserver.py @ 14939:b4c06b97dfe0
cmdserver: repo.invalidate() on every runcommand
This will trigger the filecache and recreate every cached property that was
changed by something other than this cmdserver instance (e.g. by running
'hg commit' at the cmdline).
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Mon, 25 Jul 2011 22:19:28 +0300 |
parents | a59058fd074a |
children | 3aee6e26b28b |
line wrap: on
line diff
--- a/tests/test-commandserver.py Mon Jul 25 08:28:37 2011 +0200 +++ b/tests/test-commandserver.py Mon Jul 25 22:19:28 2011 +0300 @@ -154,6 +154,30 @@ 'hooks.pre-identify=python:test-commandserver.hook', 'id'], input=cStringIO.StringIO('some input')) +def outsidechanges(server): + readchannel(server) + os.system('echo a >> a && hg ci -Am2') + runcommand(server, ['tip']) + +def bookmarks(server): + readchannel(server) + runcommand(server, ['bookmarks']) + + # changes .hg/bookmarks + os.system('hg bookmark -i bm1') + os.system('hg bookmark -i bm2') + runcommand(server, ['bookmarks']) + + # changes .hg/bookmarks.current + os.system('hg upd bm1 -q') + runcommand(server, ['bookmarks']) + +def tagscache(server): + readchannel(server) + runcommand(server, ['id', '-t', '-r', '0']) + os.system('hg tag -r 0 foo') + runcommand(server, ['id', '-t', '-r', '0']) + if __name__ == '__main__': os.system('hg init') @@ -169,3 +193,6 @@ hgrc.close() check(localhgrc) check(hookoutput) + check(outsidechanges) + check(bookmarks) + check(tagscache)