comparison tests/test-hgweb-diffs.t @ 25472:4d2b9b304ad0

tests: drop explicit $TESTDIR from executables $TESTDIR is added to the path, so this is superfluous. Also, inconsistent use of quotes means we might have broken on tests with paths containing spaces.
author Matt Mackall <mpm@selenic.com>
date Mon, 08 Jun 2015 14:44:30 -0500
parents 3b689001e7c6
children 8c14f87bd0ae
comparison
equal deleted inserted replaced
25470:378a8e700e02 25472:4d2b9b304ad0
34 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log 34 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
35 $ cat hg.pid >> $DAEMON_PIDS 35 $ cat hg.pid >> $DAEMON_PIDS
36 36
37 revision 37 revision
38 38
39 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'rev/0' 39 $ get-with-headers.py localhost:$HGPORT 'rev/0'
40 200 Script output follows 40 200 Script output follows
41 41
42 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 42 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
43 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> 43 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
44 <head> 44 <head>
166 </html> 166 </html>
167 167
168 168
169 raw revision 169 raw revision
170 170
171 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'raw-rev/0' 171 $ get-with-headers.py localhost:$HGPORT 'raw-rev/0'
172 200 Script output follows 172 200 Script output follows
173 173
174 174
175 # HG changeset patch 175 # HG changeset patch
176 # User test 176 # User test
199 $ hg parents --template "{node|short}\n" -r tip 199 $ hg parents --template "{node|short}\n" -r tip
200 0cd96de13884 200 0cd96de13884
201 $ hg parents --template "{node|short}\n" -r tip b 201 $ hg parents --template "{node|short}\n" -r tip b
202 0cd96de13884 202 0cd96de13884
203 203
204 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'diff/tip/b' 204 $ get-with-headers.py localhost:$HGPORT 'diff/tip/b'
205 200 Script output follows 205 200 Script output follows
206 206
207 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 207 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
208 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> 208 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
209 <head> 209 <head>
300 </html> 300 </html>
301 301
302 302
303 set up hgweb with git diffs 303 set up hgweb with git diffs
304 304
305 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS 305 $ killdaemons.py $DAEMON_PIDS
306 $ hg serve --config 'diff.git=1' -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log 306 $ hg serve --config 'diff.git=1' -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
307 $ cat hg.pid >> $DAEMON_PIDS 307 $ cat hg.pid >> $DAEMON_PIDS
308 308
309 revision 309 revision
310 310
311 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'rev/0' 311 $ get-with-headers.py localhost:$HGPORT 'rev/0'
312 200 Script output follows 312 200 Script output follows
313 313
314 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 314 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
315 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> 315 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
316 <head> 316 <head>
440 </html> 440 </html>
441 441
442 442
443 revision 443 revision
444 444
445 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'raw-rev/0' 445 $ get-with-headers.py localhost:$HGPORT 'raw-rev/0'
446 200 Script output follows 446 200 Script output follows
447 447
448 448
449 # HG changeset patch 449 # HG changeset patch
450 # User test 450 # User test
475 $ hg parents --template "{node|short}\n" -r tip 475 $ hg parents --template "{node|short}\n" -r tip
476 0cd96de13884 476 0cd96de13884
477 $ hg parents --template "{node|short}\n" -r tip a 477 $ hg parents --template "{node|short}\n" -r tip a
478 0cd96de13884 478 0cd96de13884
479 479
480 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'diff/tip/a' 480 $ get-with-headers.py localhost:$HGPORT 'diff/tip/a'
481 200 Script output follows 481 200 Script output follows
482 482
483 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 483 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
484 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> 484 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
485 <head> 485 <head>
578 578
579 $ hg parents --template "{rev}:{node|short}\n" -r 0 579 $ hg parents --template "{rev}:{node|short}\n" -r 0
580 $ hg log --template "{rev}:{node|short}\n" -r 0 580 $ hg log --template "{rev}:{node|short}\n" -r 0
581 0:0cd96de13884 581 0:0cd96de13884
582 582
583 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'comparison/0/a' 583 $ get-with-headers.py localhost:$HGPORT 'comparison/0/a'
584 200 Script output follows 584 200 Script output follows
585 585
586 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 586 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
587 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> 587 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
588 <head> 588 <head>
705 $ hg parents --template "{rev}:{node|short}\n" -r tip 705 $ hg parents --template "{rev}:{node|short}\n" -r tip
706 1:559edbd9ed20 706 1:559edbd9ed20
707 $ hg log --template "{rev}:{node|short}\n" -r tip 707 $ hg log --template "{rev}:{node|short}\n" -r tip
708 2:d73db4d812ff 708 2:d73db4d812ff
709 709
710 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'comparison/tip/a' 710 $ get-with-headers.py localhost:$HGPORT 'comparison/tip/a'
711 200 Script output follows 711 200 Script output follows
712 712
713 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 713 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
714 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> 714 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
715 <head> 715 <head>
834 $ hg parents --template "{rev}:{node|short}\n" -r tip 834 $ hg parents --template "{rev}:{node|short}\n" -r tip
835 2:d73db4d812ff 835 2:d73db4d812ff
836 $ hg log --template "{rev}:{node|short}\n" -r tip 836 $ hg log --template "{rev}:{node|short}\n" -r tip
837 3:20e80271eb7a 837 3:20e80271eb7a
838 838
839 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'comparison/tip/a' 839 $ get-with-headers.py localhost:$HGPORT 'comparison/tip/a'
840 200 Script output follows 840 200 Script output follows
841 841
842 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 842 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
843 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> 843 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
844 <head> 844 <head>
969 $ hg parents --template "{rev}:{node|short}\n" -r tip 969 $ hg parents --template "{rev}:{node|short}\n" -r tip
970 4:402bea3b0976 970 4:402bea3b0976
971 $ hg parents --template "{rev}:{node|short}\n" -r tip e 971 $ hg parents --template "{rev}:{node|short}\n" -r tip e
972 4:402bea3b0976 972 4:402bea3b0976
973 973
974 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'comparison/tip/e' 974 $ get-with-headers.py localhost:$HGPORT 'comparison/tip/e'
975 200 Script output follows 975 200 Script output follows
976 976
977 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 977 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
978 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> 978 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
979 <head> 979 <head>
1092 $ cd test1 1092 $ cd test1
1093 $ hg import -q --bypass --exact http://localhost:$HGPORT/rev/1 1093 $ hg import -q --bypass --exact http://localhost:$HGPORT/rev/1
1094 1094
1095 raw revision with diff block numbers 1095 raw revision with diff block numbers
1096 1096
1097 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS 1097 $ killdaemons.py $DAEMON_PIDS
1098 $ cat <<EOF > .hg/hgrc 1098 $ cat <<EOF > .hg/hgrc
1099 > [web] 1099 > [web]
1100 > templates = rawdiff 1100 > templates = rawdiff
1101 > EOF 1101 > EOF
1102 $ mkdir rawdiff 1102 $ mkdir rawdiff
1112 > fileline = '{line}' 1112 > fileline = '{line}'
1113 > diffblock = 'Block: {blockno}\n{lines}\n' 1113 > diffblock = 'Block: {blockno}\n{lines}\n'
1114 > EOF 1114 > EOF
1115 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log 1115 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
1116 $ cat hg.pid >> $DAEMON_PIDS 1116 $ cat hg.pid >> $DAEMON_PIDS
1117 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'raw-rev/0' 1117 $ get-with-headers.py localhost:$HGPORT 'raw-rev/0'
1118 200 Script output follows 1118 200 Script output follows
1119 1119
1120 Block: 1 1120 Block: 1
1121 diff -r 000000000000 -r 0cd96de13884 a 1121 diff -r 000000000000 -r 0cd96de13884 a
1122 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1122 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1129 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1129 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1130 +++ b/b Thu Jan 01 00:00:00 1970 +0000 1130 +++ b/b Thu Jan 01 00:00:00 1970 +0000
1131 @@ -0,0 +1,1 @@ 1131 @@ -0,0 +1,1 @@
1132 +b 1132 +b
1133 1133
1134 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS 1134 $ killdaemons.py $DAEMON_PIDS
1135 $ rm .hg/hgrc rawdiff/map 1135 $ rm .hg/hgrc rawdiff/map
1136 $ rmdir rawdiff 1136 $ rmdir rawdiff
1137 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log 1137 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
1138 $ cat hg.pid >> $DAEMON_PIDS 1138 $ cat hg.pid >> $DAEMON_PIDS
1139 1139