Show More
1 | NO CONTENT: file renamed from tests/repr.py to tests/printrepr.py |
|
NO CONTENT: file renamed from tests/repr.py to tests/printrepr.py |
@@ -1,63 +1,63 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 | # An attempt at more fully testing the hgweb web interface. |
|
2 | # An attempt at more fully testing the hgweb web interface. | |
3 | # The following things are tested elsewhere and are therefore omitted: |
|
3 | # The following things are tested elsewhere and are therefore omitted: | |
4 | # - archive, tested in test-archive |
|
4 | # - archive, tested in test-archive | |
5 | # - unbundle, tested in test-push-http |
|
5 | # - unbundle, tested in test-push-http | |
6 | # - changegroupsubset, tested in test-pull |
|
6 | # - changegroupsubset, tested in test-pull | |
7 |
|
7 | |||
8 | echo % Set up the repo |
|
8 | echo % Set up the repo | |
9 | hg init test |
|
9 | hg init test | |
10 | cd test |
|
10 | cd test | |
11 | mkdir da |
|
11 | mkdir da | |
12 | echo foo > da/foo |
|
12 | echo foo > da/foo | |
13 | echo foo > foo |
|
13 | echo foo > foo | |
14 | hg ci -Ambase |
|
14 | hg ci -Ambase | |
15 | hg tag 1.0 |
|
15 | hg tag 1.0 | |
16 | echo another > foo |
|
16 | echo another > foo | |
17 | hg branch stable |
|
17 | hg branch stable | |
18 | hg ci -Ambranch |
|
18 | hg ci -Ambranch | |
19 | hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
19 | hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log | |
20 | cat hg.pid >> $DAEMON_PIDS |
|
20 | cat hg.pid >> $DAEMON_PIDS | |
21 |
|
21 | |||
22 | echo % Logs and changes |
|
22 | echo % Logs and changes | |
23 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" |
|
23 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" | |
24 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" |
|
24 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" | |
25 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/foo/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" |
|
25 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/foo/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" | |
26 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/shortlog/' |
|
26 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/shortlog/' | |
27 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/0/' |
|
27 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/0/' | |
28 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/1/?style=raw' |
|
28 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/1/?style=raw' | |
29 |
|
29 | |||
30 | echo % File-related |
|
30 | echo % File-related | |
31 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo/?style=raw' |
|
31 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo/?style=raw' | |
32 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/annotate/1/foo/?style=raw' |
|
32 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/annotate/1/foo/?style=raw' | |
33 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/?style=raw' |
|
33 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/?style=raw' | |
34 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo' |
|
34 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo' | |
35 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/filediff/1/foo/?style=raw' |
|
35 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/filediff/1/foo/?style=raw' | |
36 |
|
36 | |||
37 | echo % Overviews |
|
37 | echo % Overviews | |
38 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/tags/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" |
|
38 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/tags/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" | |
39 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/branches/?style=gitweb' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" |
|
39 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/branches/?style=gitweb' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" | |
40 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/summary/?style=gitweb' |
|
40 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/summary/?style=gitweb' | |
41 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/?style=gitweb' |
|
41 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/?style=gitweb' | |
42 |
|
42 | |||
43 | echo % capabilities |
|
43 | echo % capabilities | |
44 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=capabilities' |
|
44 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=capabilities' | |
45 | echo % heads |
|
45 | echo % heads | |
46 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=heads' |
|
46 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=heads' | |
47 | echo % lookup |
|
47 | echo % lookup | |
48 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=lookup&node=1' |
|
48 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=lookup&node=1' | |
49 | echo % branches |
|
49 | echo % branches | |
50 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=branches' |
|
50 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=branches' | |
51 | echo % changegroup |
|
51 | echo % changegroup | |
52 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=changegroup' \ |
|
52 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=changegroup' \ | |
53 | | $TESTDIR/repr.py |
|
53 | | $TESTDIR/printrepr.py | |
54 | echo % stream_out |
|
54 | echo % stream_out | |
55 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=stream_out' |
|
55 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=stream_out' | |
56 | echo % failing unbundle, requires POST request |
|
56 | echo % failing unbundle, requires POST request | |
57 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=unbundle' |
|
57 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=unbundle' | |
58 |
|
58 | |||
59 | echo % Static files |
|
59 | echo % Static files | |
60 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/static/style.css' |
|
60 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/static/style.css' | |
61 |
|
61 | |||
62 | echo % ERRORS ENCOUNTERED |
|
62 | echo % ERRORS ENCOUNTERED | |
63 | cat errors.log |
|
63 | cat errors.log |
@@ -1,61 +1,61 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | cp "$TESTDIR"/../contrib/simplemerge . |
|
3 | cp "$TESTDIR"/../contrib/simplemerge . | |
4 |
|
4 | |||
5 | echo base > base |
|
5 | echo base > base | |
6 |
|
6 | |||
7 | echo local > local |
|
7 | echo local > local | |
8 | cat base >> local |
|
8 | cat base >> local | |
9 | cp local orig |
|
9 | cp local orig | |
10 |
|
10 | |||
11 | cat base > other |
|
11 | cat base > other | |
12 | echo other >> other |
|
12 | echo other >> other | |
13 |
|
13 | |||
14 | echo '% changing local directly' |
|
14 | echo '% changing local directly' | |
15 | python simplemerge local base other && echo "merge succeeded" |
|
15 | python simplemerge local base other && echo "merge succeeded" | |
16 | cat local |
|
16 | cat local | |
17 | cp orig local |
|
17 | cp orig local | |
18 |
|
18 | |||
19 | echo '% printing to stdout' |
|
19 | echo '% printing to stdout' | |
20 | python simplemerge -p local base other |
|
20 | python simplemerge -p local base other | |
21 | echo ' local:' |
|
21 | echo ' local:' | |
22 | cat local |
|
22 | cat local | |
23 |
|
23 | |||
24 | echo '% conflicts' |
|
24 | echo '% conflicts' | |
25 | cp base conflict-local |
|
25 | cp base conflict-local | |
26 | cp other conflict-other |
|
26 | cp other conflict-other | |
27 | echo not other >> conflict-local |
|
27 | echo not other >> conflict-local | |
28 | echo end >> conflict-local |
|
28 | echo end >> conflict-local | |
29 | echo end >> conflict-other |
|
29 | echo end >> conflict-other | |
30 | python simplemerge -p conflict-local base conflict-other || echo "merge failed" |
|
30 | python simplemerge -p conflict-local base conflict-other || echo "merge failed" | |
31 |
|
31 | |||
32 | echo '% --no-minimal' |
|
32 | echo '% --no-minimal' | |
33 | python simplemerge -p --no-minimal conflict-local base conflict-other |
|
33 | python simplemerge -p --no-minimal conflict-local base conflict-other | |
34 |
|
34 | |||
35 | echo '% 1 label' |
|
35 | echo '% 1 label' | |
36 | python simplemerge -p -L foo conflict-local base conflict-other |
|
36 | python simplemerge -p -L foo conflict-local base conflict-other | |
37 |
|
37 | |||
38 | echo '% 2 labels' |
|
38 | echo '% 2 labels' | |
39 | python simplemerge -p -L foo -L bar conflict-local base conflict-other |
|
39 | python simplemerge -p -L foo -L bar conflict-local base conflict-other | |
40 |
|
40 | |||
41 | echo '% too many labels' |
|
41 | echo '% too many labels' | |
42 | python simplemerge -p -L foo -L bar -L baz conflict-local base conflict-other |
|
42 | python simplemerge -p -L foo -L bar -L baz conflict-local base conflict-other | |
43 |
|
43 | |||
44 | echo '% binary file' |
|
44 | echo '% binary file' | |
45 | python -c "f = file('binary-local', 'w'); f.write('\x00'); f.close()" |
|
45 | python -c "f = file('binary-local', 'w'); f.write('\x00'); f.close()" | |
46 | cat orig >> binary-local |
|
46 | cat orig >> binary-local | |
47 | python simplemerge -p binary-local base other |
|
47 | python simplemerge -p binary-local base other | |
48 |
|
48 | |||
49 | echo '% binary file --text' |
|
49 | echo '% binary file --text' | |
50 | python simplemerge -a -p binary-local base other 2>&1 | $TESTDIR/repr.py |
|
50 | python simplemerge -a -p binary-local base other 2>&1 | $TESTDIR/printrepr.py | |
51 |
|
51 | |||
52 | echo '% help' |
|
52 | echo '% help' | |
53 | python simplemerge --help |
|
53 | python simplemerge --help | |
54 |
|
54 | |||
55 | echo '% wrong number of arguments' |
|
55 | echo '% wrong number of arguments' | |
56 | python simplemerge |
|
56 | python simplemerge | |
57 |
|
57 | |||
58 | echo '% bad option' |
|
58 | echo '% bad option' | |
59 | python simplemerge --foo -p local base other |
|
59 | python simplemerge --foo -p local base other | |
60 |
|
60 | |||
61 | exit 0 |
|
61 | exit 0 |
General Comments 0
You need to be logged in to leave comments.
Login now