Mercurial > hg
view tests/test-filecache.py.out @ 29494:3b5389ef5cfe
perf: define util.safehasattr forcibly for Mercurial earlier than 1.9.3
Before this patch, using util.safehasattr() prevents perf.py from
being loaded by Mercurial earlier than 1.9.3 (or 94b200a11cf7),
because util.safehasattr() isn't available in such Mercurial, even
though there are some code paths for Mercurial earlier than 1.9.3.
For example, setting "_prereadsize" attribute in perfindex() and
perfnodelookup() is effective only with Mercurial earlier than 1.8 (or
61c9bc3da402).
This patch is a preparation for using util.safehasattr() safely in
subsequent patches.
This patch defines util.safehasattr() forcibly without examining
whether it is available or not, because:
- examining existence of "safehasattr" safely itself needs similar logic
- safehasattr() is small enough to define locally
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Tue, 05 Jul 2016 07:25:51 +0900 |
parents | b3684fd2ff1a |
children | 57830bd0e787 |
line wrap: on
line source
basic: * neither file exists creating * neither file still exists * empty file x created creating * file x changed size creating * nothing changed with either file * file x changed inode creating * empty file y created creating * file y changed size creating * file y changed inode creating * both files changed inode creating fakeuncacheable: * neither file exists creating * neither file still exists creating * empty file x created creating * file x changed size creating * nothing changed with either file creating * file x changed inode creating * empty file y created creating * file y changed size creating * file y changed inode creating * both files changed inode creating repository tip rolled back to revision -1 (undo commit) working directory now based on revision -1 repository tip rolled back to revision -1 (undo commit) working directory now based on revision -1 setbeforeget: * neither file exists string set externally * file x created creating string from function * string set externally again string 2 set externally * file y created creating string from function