2007-06-19 04:43:26 +04:00
|
|
|
from mercurial import demandimport
|
|
|
|
demandimport.enable()
|
|
|
|
|
2014-12-23 01:27:31 +03:00
|
|
|
import os
|
|
|
|
if os.name != 'nt':
|
|
|
|
try:
|
|
|
|
import distutils.msvc9compiler
|
|
|
|
print ('distutils.msvc9compiler needs to be an immediate '
|
|
|
|
'importerror on non-windows platforms')
|
|
|
|
distutils.msvc9compiler
|
|
|
|
except ImportError:
|
|
|
|
pass
|
|
|
|
|
2007-06-19 04:43:26 +04:00
|
|
|
import re
|
|
|
|
|
|
|
|
rsub = re.sub
|
|
|
|
def f(obj):
|
|
|
|
l = repr(obj)
|
2007-07-05 21:11:38 +04:00
|
|
|
l = rsub("0x[0-9a-fA-F]+", "0x?", l)
|
2007-06-19 04:43:26 +04:00
|
|
|
l = rsub("from '.*'", "from '?'", l)
|
2010-12-01 23:46:08 +03:00
|
|
|
l = rsub("'<[a-z]*>'", "'<whatever>'", l)
|
2007-06-19 04:43:26 +04:00
|
|
|
return l
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
print "os =", f(os)
|
|
|
|
print "os.system =", f(os.system)
|
|
|
|
print "os =", f(os)
|
|
|
|
|
|
|
|
from mercurial import util
|
|
|
|
|
|
|
|
print "util =", f(util)
|
|
|
|
print "util.system =", f(util.system)
|
|
|
|
print "util =", f(util)
|
|
|
|
print "util.system =", f(util.system)
|
|
|
|
|
|
|
|
import re as fred
|
|
|
|
print "fred =", f(fred)
|
|
|
|
|
|
|
|
import sys as re
|
|
|
|
print "re =", f(re)
|
|
|
|
|
|
|
|
print "fred =", f(fred)
|
|
|
|
print "fred.sub =", f(fred.sub)
|
|
|
|
print "fred =", f(fred)
|
|
|
|
|
|
|
|
print "re =", f(re)
|
2009-07-15 06:38:12 +04:00
|
|
|
print "re.stderr =", f(re.stderr)
|
2007-06-19 04:43:26 +04:00
|
|
|
print "re =", f(re)
|
2014-04-08 03:35:13 +04:00
|
|
|
|
|
|
|
demandimport.disable()
|
|
|
|
os.environ['HGDEMANDIMPORT'] = 'disable'
|
|
|
|
demandimport.enable()
|
|
|
|
from mercurial import node
|
|
|
|
print "node =", f(node)
|