tests/sitecustomize.py
author Mads Kiilerich <madski@unity3d.com>
Fri, 06 Feb 2015 02:52:10 +0100
branchstable
changeset 24159 5b4ed033390b
parent 14971 0b21ae0a2366
child 24505 031947baf4d0
permissions -rw-r--r--
revisionbranchcache: fall back to slow path if starting readonly (issue4531) Transitioning to Mercurial versions with revision branch cache could be slow as long as all operations were readonly (revset queries) and the cache would be populated but not written back. Instead, fall back to using the consistently slow path when readonly and the cache doesn't exist yet. That avoids the overhead of populating the cache without writing it back. If not readonly, it will still populate all missing entries initially. That avoids repeated writing of the cache file with small updates, and it also makes sure a fully populated cache available for the readonly operations.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10648
58128004cca1 tests: use external coverage, mandate newer version
Dirkjan Ochtman <djc.ochtman@kentyde.com>
parents:
diff changeset
     1
try:
58128004cca1 tests: use external coverage, mandate newer version
Dirkjan Ochtman <djc.ochtman@kentyde.com>
parents:
diff changeset
     2
    import coverage
14971
0b21ae0a2366 tests: use getattr instead of hasattr
Augie Fackler <durin42@gmail.com>
parents: 10648
diff changeset
     3
    getattr(coverage, 'process_startup', lambda: None)()
10648
58128004cca1 tests: use external coverage, mandate newer version
Dirkjan Ochtman <djc.ochtman@kentyde.com>
parents:
diff changeset
     4
except ImportError:
58128004cca1 tests: use external coverage, mandate newer version
Dirkjan Ochtman <djc.ochtman@kentyde.com>
parents:
diff changeset
     5
    pass