annotate tests/test-filecache.py.out @ 19933:621a26eb3a99

demandimport: allow extensions to import own modules by absolute name Before this patch, python modules of each extensions can't import another one in own extension by absolute name, because root modules of each extensions are loaded with "hgext_" prefix. For example, "import extroot.bar" in "extroot/foo.py" of "extroot" extension fails, even though "import bar" in it succeeds. Installing extensions into site-packages of python library path can avoid this problem, but this solution is not reasonable in some cases: using binary package of Mercurial on Windows, for example. This patch retries to import with "hgext_" prefix after ImportError, if the module in the extension may try to import another one in own extension. This patch doesn't change some "_import()"/"_origimport()" invocations below, because ordinary extensions shouldn't cause such invocations. - invocation of "_import()" when root module imports sub-module by absolute path without "fromlist" for example, "import a.b" in "a.__init__.py". extensions are loaded with "hgext_" prefix, and this causes execution of another (= fixed by this patch) code path. - invocation of "_origimport()" when "level != -1" with "fromlist" for example, importing after "from __future__ import absolute_import" (level == 0), or "from . import b" or "from .a import b" (0 < level), for portability between python versions and environments, extensions shouldn't cause "level != -1".
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Sat, 05 Oct 2013 01:02:22 +0900
parents f36375576ed5
children ed80cecdfc57
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14928
dca59d5be12d scmutil: introduce filecache
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
1 basic:
dca59d5be12d scmutil: introduce filecache
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
2
dca59d5be12d scmutil: introduce filecache
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
3 creating
dca59d5be12d scmutil: introduce filecache
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
4 creating
dca59d5be12d scmutil: introduce filecache
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
5 creating
dca59d5be12d scmutil: introduce filecache
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
6 creating
dca59d5be12d scmutil: introduce filecache
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
7
dca59d5be12d scmutil: introduce filecache
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
8 fakeuncacheable:
dca59d5be12d scmutil: introduce filecache
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
9
dca59d5be12d scmutil: introduce filecache
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
10 creating
dca59d5be12d scmutil: introduce filecache
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
11 creating
dca59d5be12d scmutil: introduce filecache
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
12 creating
dca59d5be12d scmutil: introduce filecache
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
13 creating
dca59d5be12d scmutil: introduce filecache
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
14 creating
dca59d5be12d scmutil: introduce filecache
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
15 creating
18313
3e4a944c0d04 destroyed: keep the filecache in sync with __dict__ (issue3335) (issue3693) (issue3743)
Idan Kamara <idankk86@gmail.com>
parents: 14928
diff changeset
16 repository tip rolled back to revision -1 (undo commit)
3e4a944c0d04 destroyed: keep the filecache in sync with __dict__ (issue3335) (issue3693) (issue3743)
Idan Kamara <idankk86@gmail.com>
parents: 14928
diff changeset
17 working directory now based on revision -1
3e4a944c0d04 destroyed: keep the filecache in sync with __dict__ (issue3335) (issue3693) (issue3743)
Idan Kamara <idankk86@gmail.com>
parents: 14928
diff changeset
18 repository tip rolled back to revision -1 (undo commit)
3e4a944c0d04 destroyed: keep the filecache in sync with __dict__ (issue3335) (issue3693) (issue3743)
Idan Kamara <idankk86@gmail.com>
parents: 14928
diff changeset
19 working directory now based on revision -1
18316
f36375576ed5 filecache: create an entry in _filecache when __set__ is called for a missing one
Idan Kamara <idankk86@gmail.com>
parents: 18313
diff changeset
20
f36375576ed5 filecache: create an entry in _filecache when __set__ is called for a missing one
Idan Kamara <idankk86@gmail.com>
parents: 18313
diff changeset
21 setbeforeget:
f36375576ed5 filecache: create an entry in _filecache when __set__ is called for a missing one
Idan Kamara <idankk86@gmail.com>
parents: 18313
diff changeset
22
f36375576ed5 filecache: create an entry in _filecache when __set__ is called for a missing one
Idan Kamara <idankk86@gmail.com>
parents: 18313
diff changeset
23 0
f36375576ed5 filecache: create an entry in _filecache when __set__ is called for a missing one
Idan Kamara <idankk86@gmail.com>
parents: 18313
diff changeset
24 creating
f36375576ed5 filecache: create an entry in _filecache when __set__ is called for a missing one
Idan Kamara <idankk86@gmail.com>
parents: 18313
diff changeset
25 None