Mercurial > hg
annotate tests/test-hgwebdirsym.t @ 12664:545ec1775021
merge: handle no file parent in backwards merge (issue2364)
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 09 Oct 2010 14:50:20 -0500 |
parents | a4c19a900794 |
children | 86888ae9ce90 |
rev | line source |
---|---|
12444
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
1 Tests whether or not hgwebdir properly handles various symlink topologies. |
6341
63bdfcc3eaaf
test: Add tests for webdir symlinks and walkrepos.
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
2 |
12444
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
3 $ "$TESTDIR/hghave" symlink || exit 80 |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
4 $ hg init a |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
5 $ echo a > a/a |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
6 $ hg --cwd a ci -Ama -d'1 0' |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
7 adding a |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
8 $ mkdir webdir |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
9 $ cd webdir |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
10 $ hg init b |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
11 $ echo b > b/b |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
12 $ hg --cwd b ci -Amb -d'2 0' |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
13 adding b |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
14 $ hg init c |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
15 $ echo c > c/c |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
16 $ hg --cwd c ci -Amc -d'3 0' |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
17 adding c |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
18 $ ln -s ../a al |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
19 $ ln -s ../webdir circle |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
20 $ root=`pwd` |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
21 $ cd .. |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
22 $ cat > collections.conf <<EOF |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
23 > [collections] |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
24 > $root=$root |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
25 > EOF |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
26 $ hg serve -p $HGPORT -d --pid-file=hg.pid --webdir-conf collections.conf \ |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
27 > -A access-collections.log -E error-collections.log |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
28 $ cat hg.pid >> $DAEMON_PIDS |
6341
63bdfcc3eaaf
test: Add tests for webdir symlinks and walkrepos.
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
29 |
12444
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
30 should succeed |
6341
63bdfcc3eaaf
test: Add tests for webdir symlinks and walkrepos.
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
31 |
12444
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
32 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?style=raw' |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
33 200 Script output follows |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
34 |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
35 |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
36 /al/ |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
37 /b/ |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
38 /c/ |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
39 |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
40 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/al/file/tip/a?style=raw' |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
41 200 Script output follows |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
42 |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
43 a |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
44 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/b/file/tip/b?style=raw' |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
45 200 Script output follows |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
46 |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
47 b |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
48 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/c/file/tip/c?style=raw' |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
49 200 Script output follows |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
50 |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
51 c |
6341
63bdfcc3eaaf
test: Add tests for webdir symlinks and walkrepos.
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
52 |
12444
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
53 should fail |
6341
63bdfcc3eaaf
test: Add tests for webdir symlinks and walkrepos.
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
54 |
12444
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
55 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/circle/al/file/tip/a?style=raw' |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
56 404 Not Found |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
57 |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
58 |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
59 error: repository circle not found |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
60 [1] |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
61 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/circle/b/file/tip/a?style=raw' |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
62 404 Not Found |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
63 |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
64 |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
65 error: repository circle not found |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
66 [1] |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
67 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/circle/c/file/tip/a?style=raw' |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
68 404 Not Found |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
69 |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
70 |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
71 error: repository circle not found |
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
72 [1] |
6341
63bdfcc3eaaf
test: Add tests for webdir symlinks and walkrepos.
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
73 |
12444
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
74 collections errors |
6341
63bdfcc3eaaf
test: Add tests for webdir symlinks and walkrepos.
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
75 |
12444
a4c19a900794
tests: unify test-hgwebdirsym
Matt Mackall <mpm@selenic.com>
parents:
6341
diff
changeset
|
76 $ cat error-collections.log |