Mercurial > hg
view tests/test-status-inprocess.py @ 34342:b3538c03a804
perf: remove fallbacks to ancient versions of dirstate.walk()
If the call to dirstate.walk() failed, we would try to fall back to
older versions. These were removed in d3d1d39da2fa (walk: remove
cmdutil.walk, 2008-05-12) and f8299c84b5b6 (dirstate: fold statwalk
and walk, 2008-06-26). We don't care about testing performance of
versions that old versions at this point, so let's clean up.
Differential Revision: https://phab.mercurial-scm.org/D845
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 29 Sep 2017 14:23:41 -0700 |
parents | d83ca854fa21 |
children | 9dfa4e9ed45d |
line wrap: on
line source
#!/usr/bin/env python from __future__ import absolute_import, print_function from mercurial import ( commands, localrepo, ui as uimod, ) u = uimod.ui.load() print('% creating repo') repo = localrepo.localrepository(u, '.', create=True) f = open('test.py', 'w') try: f.write('foo\n') finally: f.close print('% add and commit') commands.add(u, repo, 'test.py') commands.commit(u, repo, message='*') commands.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 commands.status(u, repo, clean=True, modified=True)