Mercurial > hg > mercurial-source
view tests/test-status-inprocess.py @ 20452:a685d9870eb5
revset: added lazyset implementation to desc revset
Performance benchmarking:
$ time hg log -qr "first(desc(hg))"
changeset: 0:9117c6561b0b
real 0m2.210s
user 0m2.158s
sys 0m0.049s
$ time ./hg log -qr "first(desc(hg))"
changeset: 0:9117c6561b0b
real 0m0.171s
user 0m0.131s
sys 0m0.035s
author | Lucas Moscovicz <lmoscovicz@fb.com> |
---|---|
date | Thu, 30 Jan 2014 15:39:56 -0800 |
parents | 13a1b2fb7ef2 |
children | 7779f9dfd938 |
line wrap: on
line source
#!/usr/bin/python from mercurial.ui import ui from mercurial.localrepo import localrepository from mercurial.commands import add, commit, status u = ui() print '% creating repo' repo = localrepository(u, '.', create=True) f = open('test.py', 'w') try: f.write('foo\n') finally: f.close print '% add and commit' add(u, repo, 'test.py') commit(u, repo, message='*') status(u, repo, clean=True) print '% change' f = open('test.py', 'w') try: f.write('bar\n') finally: f.close() # this would return clean instead of changed before the fix status(u, repo, clean=True, modified=True)