Mercurial > public > mercurial-scm > hg
comparison doc/check-seclevel.py @ 27221:ab776610fc6d
check-seclevel: set module load policy to Python only
If we don't change this, the upcoming change to make the module
loading policy only load C modules will cause this script to fail if
run with CPython against an unbuilt source checkout.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 24 Nov 2015 22:53:55 -0800 |
parents | e0c572d4d112 |
children | 020d93c4a727 |
comparison
equal
deleted
inserted
replaced
27220:4374d819ccd5 | 27221:ab776610fc6d |
---|---|
4 | 4 |
5 import sys, os | 5 import sys, os |
6 import optparse | 6 import optparse |
7 | 7 |
8 # import from the live mercurial repo | 8 # import from the live mercurial repo |
9 os.environ['HGMODULEPOLICY'] = 'py' | |
9 sys.path.insert(0, "..") | 10 sys.path.insert(0, "..") |
10 # fall back to pure modules if required C extensions are not available | |
11 sys.path.append(os.path.join('..', 'mercurial', 'pure')) | |
12 from mercurial import demandimport; demandimport.enable() | 11 from mercurial import demandimport; demandimport.enable() |
13 from mercurial.commands import table | 12 from mercurial.commands import table |
14 from mercurial.help import helptable | 13 from mercurial.help import helptable |
15 from mercurial import extensions | 14 from mercurial import extensions |
16 from mercurial import minirst | 15 from mercurial import minirst |