##// END OF EJS Templates
tests: use $PYTHON in #! so we always use the right Python
Augie Fackler -
r32938:b6776b34 default
parent child Browse files
Show More
@@ -453,7 +453,7 b' assuming that the shell returns 127 if c'
453 test bisecting command
453 test bisecting command
454
454
455 $ cat > script.py <<EOF
455 $ cat > script.py <<EOF
456 > #!/usr/bin/env python
456 > #!$PYTHON
457 > import sys
457 > import sys
458 > from mercurial import ui, hg
458 > from mercurial import ui, hg
459 > repo = hg.repository(ui.ui.load(), '.')
459 > repo = hg.repository(ui.ui.load(), '.')
@@ -249,7 +249,7 b' Edit with extdiff -p:'
249 Prepare custom diff/edit tool:
249 Prepare custom diff/edit tool:
250
250
251 $ cat > 'diff tool.py' << EOT
251 $ cat > 'diff tool.py' << EOT
252 > #!/usr/bin/env python
252 > #!$PYTHON
253 > import time
253 > import time
254 > time.sleep(1) # avoid unchanged-timestamp problems
254 > time.sleep(1) # avoid unchanged-timestamp problems
255 > file('a/a', 'ab').write('edited\n')
255 > file('a/a', 'ab').write('edited\n')
@@ -98,7 +98,7 b' Command with no output, we just want to '
98 Check hgweb's load order:
98 Check hgweb's load order:
99
99
100 $ cat > hgweb.cgi <<EOF
100 $ cat > hgweb.cgi <<EOF
101 > #!/usr/bin/env python
101 > #!$PYTHON
102 > from mercurial import demandimport; demandimport.enable()
102 > from mercurial import demandimport; demandimport.enable()
103 > from mercurial.hgweb import hgweb
103 > from mercurial.hgweb import hgweb
104 > from mercurial.hgweb import wsgicgi
104 > from mercurial.hgweb import wsgicgi
@@ -956,7 +956,7 b' We attempt to highlight unknown files by'
956 > EOF
956 > EOF
957
957
958 $ cat > unknownfile << EOF
958 $ cat > unknownfile << EOF
959 > #!/usr/bin/python
959 > #!$PYTHON
960 > def foo():
960 > def foo():
961 > pass
961 > pass
962 > EOF
962 > EOF
@@ -93,7 +93,7 b' Verify that largefiles from pulled branc'
93 Portable way to print file permissions:
93 Portable way to print file permissions:
94
94
95 $ cat > ls-l.py <<EOF
95 $ cat > ls-l.py <<EOF
96 > #!/usr/bin/env python
96 > #!$PYTHON
97 > import sys, os
97 > import sys, os
98 > path = sys.argv[1]
98 > path = sys.argv[1]
99 > print '%03o' % (os.lstat(path).st_mode & 0777)
99 > print '%03o' % (os.lstat(path).st_mode & 0777)
@@ -215,7 +215,7 b' Test display of largefiles in hgweb'
215 Test largefiles can be loaded in hgweb (wrapcommand() shouldn't fail)
215 Test largefiles can be loaded in hgweb (wrapcommand() shouldn't fail)
216
216
217 $ cat <<EOF > "$TESTTMP/hgweb.cgi"
217 $ cat <<EOF > "$TESTTMP/hgweb.cgi"
218 > #!/usr/bin/env python
218 > #!$PYTHON
219 > from mercurial import demandimport; demandimport.enable()
219 > from mercurial import demandimport; demandimport.enable()
220 > from mercurial.hgweb import hgweb
220 > from mercurial.hgweb import hgweb
221 > from mercurial.hgweb import wsgicgi
221 > from mercurial.hgweb import wsgicgi
@@ -1,5 +1,5 b''
1 $ cat > echo.py <<EOF
1 $ cat > echo.py <<EOF
2 > #!/usr/bin/env python
2 > #!$PYTHON
3 > import os, sys
3 > import os, sys
4 > try:
4 > try:
5 > import msvcrt
5 > import msvcrt
@@ -5,7 +5,7 b' before d74fc8dec2b4 still work.'
5
5
6 $ hg init test
6 $ hg init test
7 $ cat >hgweb.cgi <<HGWEB
7 $ cat >hgweb.cgi <<HGWEB
8 > #!/usr/bin/env python
8 > #!$PYTHON
9 > #
9 > #
10 > # An example CGI script to use hgweb, edit as necessary
10 > # An example CGI script to use hgweb, edit as necessary
11 >
11 >
@@ -31,7 +31,7 b' before d74fc8dec2b4 still work.'
31 > HGWEBDIRCONF
31 > HGWEBDIRCONF
32
32
33 $ cat >hgwebdir.cgi <<HGWEBDIR
33 $ cat >hgwebdir.cgi <<HGWEBDIR
34 > #!/usr/bin/env python
34 > #!$PYTHON
35 > #
35 > #
36 > # An example CGI script to export multiple hgweb repos, edit as necessary
36 > # An example CGI script to export multiple hgweb repos, edit as necessary
37 >
37 >
@@ -5,7 +5,7 b' This is a rudimentary test of the CGI fi'
5 $ hg init test
5 $ hg init test
6
6
7 $ cat >hgweb.cgi <<HGWEB
7 $ cat >hgweb.cgi <<HGWEB
8 > #!/usr/bin/env python
8 > #!$PYTHON
9 > #
9 > #
10 > # An example CGI script to use hgweb, edit as necessary
10 > # An example CGI script to use hgweb, edit as necessary
11 >
11 >
@@ -28,7 +28,7 b' This is a rudimentary test of the CGI fi'
28 > HGWEBDIRCONF
28 > HGWEBDIRCONF
29
29
30 $ cat >hgwebdir.cgi <<HGWEBDIR
30 $ cat >hgwebdir.cgi <<HGWEBDIR
31 > #!/usr/bin/env python
31 > #!$PYTHON
32 > #
32 > #
33 > # An example CGI script to export multiple hgweb repos, edit as necessary
33 > # An example CGI script to export multiple hgweb repos, edit as necessary
34 >
34 >
@@ -4,7 +4,7 b' This tests if CGI files from before d0db'
4
4
5 $ hg init test
5 $ hg init test
6 $ cat >hgweb.cgi <<HGWEB
6 $ cat >hgweb.cgi <<HGWEB
7 > #!/usr/bin/env python
7 > #!$PYTHON
8 > #
8 > #
9 > # An example CGI script to use hgweb, edit as necessary
9 > # An example CGI script to use hgweb, edit as necessary
10 >
10 >
@@ -26,7 +26,7 b' This tests if CGI files from before d0db'
26 > HGWEBDIRCONF
26 > HGWEBDIRCONF
27
27
28 $ cat >hgwebdir.cgi <<HGWEBDIR
28 $ cat >hgwebdir.cgi <<HGWEBDIR
29 > #!/usr/bin/env python
29 > #!$PYTHON
30 > #
30 > #
31 > # An example CGI script to export multiple hgweb repos, edit as necessary
31 > # An example CGI script to export multiple hgweb repos, edit as necessary
32 >
32 >
General Comments 0
You need to be logged in to leave comments. Login now