equal
deleted
inserted
replaced
129 $ echo 'foo = !' >> $HGRCPATH |
129 $ echo 'foo = !' >> $HGRCPATH |
130 $ echo 'bar = !' >> $HGRCPATH |
130 $ echo 'bar = !' >> $HGRCPATH |
131 |
131 |
132 Check "from __future__ import absolute_import" support for external libraries |
132 Check "from __future__ import absolute_import" support for external libraries |
133 |
133 |
|
134 #if windows |
|
135 $ PATHSEP=";" |
|
136 #else |
|
137 $ PATHSEP=":" |
|
138 #endif |
|
139 $ export PATHSEP |
|
140 |
134 $ mkdir $TESTTMP/libroot |
141 $ mkdir $TESTTMP/libroot |
135 $ echo "s = 'libroot/ambig.py'" > $TESTTMP/libroot/ambig.py |
142 $ echo "s = 'libroot/ambig.py'" > $TESTTMP/libroot/ambig.py |
136 $ mkdir $TESTTMP/libroot/mod |
143 $ mkdir $TESTTMP/libroot/mod |
137 $ touch $TESTTMP/libroot/mod/__init__.py |
144 $ touch $TESTTMP/libroot/mod/__init__.py |
138 $ echo "s = 'libroot/mod/ambig.py'" > $TESTTMP/libroot/mod/ambig.py |
145 $ echo "s = 'libroot/mod/ambig.py'" > $TESTTMP/libroot/mod/ambig.py |
146 $ cat > loadabs.py <<EOF |
153 $ cat > loadabs.py <<EOF |
147 > import mod.ambigabs as ambigabs |
154 > import mod.ambigabs as ambigabs |
148 > def extsetup(): |
155 > def extsetup(): |
149 > print 'ambigabs.s=%s' % ambigabs.s |
156 > print 'ambigabs.s=%s' % ambigabs.s |
150 > EOF |
157 > EOF |
151 $ (PYTHONPATH=$PYTHONPATH:$TESTTMP/libroot; hg --config extensions.loadabs=loadabs.py root) |
158 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadabs=loadabs.py root) |
152 ambigabs.s=libroot/ambig.py |
159 ambigabs.s=libroot/ambig.py |
153 $TESTTMP/a |
160 $TESTTMP/a |
154 #endif |
161 #endif |
155 |
162 |
156 #if no-py3k |
163 #if no-py3k |
161 $ cat > loadrel.py <<EOF |
168 $ cat > loadrel.py <<EOF |
162 > import mod.ambigrel as ambigrel |
169 > import mod.ambigrel as ambigrel |
163 > def extsetup(): |
170 > def extsetup(): |
164 > print 'ambigrel.s=%s' % ambigrel.s |
171 > print 'ambigrel.s=%s' % ambigrel.s |
165 > EOF |
172 > EOF |
166 $ (PYTHONPATH=$PYTHONPATH:$TESTTMP/libroot; hg --config extensions.loadrel=loadrel.py root) |
173 $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadrel=loadrel.py root) |
167 ambigrel.s=libroot/mod/ambig.py |
174 ambigrel.s=libroot/mod/ambig.py |
168 $TESTTMP/a |
175 $TESTTMP/a |
169 #endif |
176 #endif |
170 |
177 |
171 Check absolute/relative import of extension specific modules |
178 Check absolute/relative import of extension specific modules |