Show More
@@ -1,81 +1,149 b'' | |||||
1 | #! /bin/sh |
|
|||
2 |
|
||||
3 | echo "[extensions]" >> $HGRCPATH |
|
|||
4 | echo "mq=" >> $HGRCPATH |
|
|||
5 |
|
||||
6 | mkdir webdir |
|
|||
7 | cd webdir |
|
|||
8 |
|
1 | |||
9 | hg init a |
|
2 | $ echo "[extensions]" >> $HGRCPATH | |
10 | hg --cwd a qinit -c |
|
3 | $ echo "mq=" >> $HGRCPATH | |
11 | echo a > a/a |
|
4 | $ mkdir webdir | |
12 | hg --cwd a ci -A -m a |
|
5 | $ cd webdir | |
13 | echo b > a/b |
|
6 | $ hg init a | |
14 | hg --cwd a addremove |
|
7 | $ hg --cwd a qinit -c | |
15 | hg --cwd a qnew -f b.patch |
|
8 | $ echo a > a/a | |
16 |
hg --cwd a |
|
9 | $ hg --cwd a ci -A -m a | |
|
10 | adding a | |||
|
11 | $ echo b > a/b | |||
|
12 | $ hg --cwd a addremove | |||
|
13 | adding b | |||
|
14 | $ hg --cwd a qnew -f b.patch | |||
|
15 | $ hg --cwd a qcommit -m b.patch | |||
|
16 | $ hg --cwd a log --template "{desc}\n" | |||
|
17 | [mq]: b.patch | |||
|
18 | a | |||
|
19 | $ hg --cwd a/.hg/patches log --template "{desc}\n" | |||
|
20 | b.patch | |||
|
21 | $ root=`pwd` | |||
|
22 | $ cd .. | |||
|
23 | ||||
|
24 | test with recursive collection | |||
17 |
|
25 | |||
18 | hg --cwd a log --template "{desc}\n" |
|
26 | $ cat > collections.conf <<EOF | |
19 | hg --cwd a/.hg/patches log --template "{desc}\n" |
|
27 | > [paths] | |
20 |
|
28 | > /=$root/** | ||
21 | root=`pwd` |
|
29 | > EOF | |
22 |
|
30 | $ hg serve -p $HGPORT -d --pid-file=hg.pid --webdir-conf collections.conf \ | ||
23 | cd .. |
|
31 | > -A access-paths.log -E error-paths-1.log | |
24 |
|
32 | $ cat hg.pid >> $DAEMON_PIDS | ||
25 | echo % test with recursive collection |
|
33 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?style=raw' | |
|
34 | 200 Script output follows | |||
|
35 | ||||
|
36 | ||||
|
37 | /a/ | |||
|
38 | /a/.hg/patches/ | |||
|
39 | ||||
|
40 | $ hg qclone http://localhost:$HGPORT/a b | |||
|
41 | requesting all changes | |||
|
42 | adding changesets | |||
|
43 | adding manifests | |||
|
44 | adding file changes | |||
|
45 | added 2 changesets with 2 changes to 2 files | |||
|
46 | requesting all changes | |||
|
47 | adding changesets | |||
|
48 | adding manifests | |||
|
49 | adding file changes | |||
|
50 | added 1 changesets with 3 changes to 3 files | |||
|
51 | updating to branch default | |||
|
52 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
53 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
54 | $ hg --cwd b log --template "{desc}\n" | |||
|
55 | a | |||
|
56 | $ hg --cwd b qpush -a | |||
|
57 | applying b.patch | |||
|
58 | now at: b.patch | |||
|
59 | $ hg --cwd b log --template "{desc}\n" | |||
|
60 | imported patch b.patch | |||
|
61 | a | |||
26 |
|
62 | |||
27 | cat > collections.conf <<EOF |
|
63 | test with normal collection | |
28 | [paths] |
|
|||
29 | /=$root/** |
|
|||
30 | EOF |
|
|||
31 |
|
||||
32 | hg serve -p $HGPORT -d --pid-file=hg.pid --webdir-conf collections.conf \ |
|
|||
33 | -A access-paths.log -E error-paths-1.log |
|
|||
34 | cat hg.pid >> $DAEMON_PIDS |
|
|||
35 |
|
||||
36 | "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?style=raw' |
|
|||
37 |
|
64 | |||
38 | hg qclone http://localhost:$HGPORT/a b |
|
65 | $ cat > collections1.conf <<EOF | |
39 | hg --cwd b log --template "{desc}\n" |
|
66 | > [paths] | |
40 | hg --cwd b qpush -a |
|
67 | > /=$root/* | |
41 | hg --cwd b log --template "{desc}\n" |
|
68 | > EOF | |
42 |
|
69 | $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf collections1.conf \ | ||
43 | echo % test with normal collection |
|
70 | > -A access-paths.log -E error-paths-1.log | |
|
71 | $ cat hg.pid >> $DAEMON_PIDS | |||
|
72 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw' | |||
|
73 | 200 Script output follows | |||
|
74 | ||||
|
75 | ||||
|
76 | /a/ | |||
|
77 | /a/.hg/patches/ | |||
|
78 | ||||
|
79 | $ hg qclone http://localhost:$HGPORT1/a c | |||
|
80 | requesting all changes | |||
|
81 | adding changesets | |||
|
82 | adding manifests | |||
|
83 | adding file changes | |||
|
84 | added 2 changesets with 2 changes to 2 files | |||
|
85 | requesting all changes | |||
|
86 | adding changesets | |||
|
87 | adding manifests | |||
|
88 | adding file changes | |||
|
89 | added 1 changesets with 3 changes to 3 files | |||
|
90 | updating to branch default | |||
|
91 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
92 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
93 | $ hg --cwd c log --template "{desc}\n" | |||
|
94 | a | |||
|
95 | $ hg --cwd c qpush -a | |||
|
96 | applying b.patch | |||
|
97 | now at: b.patch | |||
|
98 | $ hg --cwd c log --template "{desc}\n" | |||
|
99 | imported patch b.patch | |||
|
100 | a | |||
44 |
|
101 | |||
45 | cat > collections1.conf <<EOF |
|
102 | test with old-style collection | |
46 | [paths] |
|
|||
47 | /=$root/* |
|
|||
48 | EOF |
|
|||
49 |
|
||||
50 | hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf collections1.conf \ |
|
|||
51 | -A access-paths.log -E error-paths-1.log |
|
|||
52 | cat hg.pid >> $DAEMON_PIDS |
|
|||
53 |
|
||||
54 | "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw' |
|
|||
55 |
|
103 | |||
56 | hg qclone http://localhost:$HGPORT1/a c |
|
104 | $ cat > collections2.conf <<EOF | |
57 | hg --cwd c log --template "{desc}\n" |
|
105 | > [collections] | |
58 | hg --cwd c qpush -a |
|
106 | > $root=$root | |
59 | hg --cwd c log --template "{desc}\n" |
|
107 | > EOF | |
60 |
|
108 | $ hg serve -p $HGPORT2 -d --pid-file=hg.pid --webdir-conf collections2.conf \ | ||
61 | echo % test with old-style collection |
|
109 | > -A access-paths.log -E error-paths-1.log | |
62 |
|
110 | $ cat hg.pid >> $DAEMON_PIDS | ||
63 | cat > collections2.conf <<EOF |
|
111 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/?style=raw' | |
64 | [collections] |
|
112 | 200 Script output follows | |
65 | $root=$root |
|
113 | ||
66 | EOF |
|
114 | ||
|
115 | /a/ | |||
|
116 | /a/.hg/patches/ | |||
|
117 | ||||
|
118 | $ hg qclone http://localhost:$HGPORT2/a d | |||
|
119 | requesting all changes | |||
|
120 | adding changesets | |||
|
121 | adding manifests | |||
|
122 | adding file changes | |||
|
123 | added 2 changesets with 2 changes to 2 files | |||
|
124 | requesting all changes | |||
|
125 | adding changesets | |||
|
126 | adding manifests | |||
|
127 | adding file changes | |||
|
128 | added 1 changesets with 3 changes to 3 files | |||
|
129 | updating to branch default | |||
|
130 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
131 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
132 | $ hg --cwd d log --template "{desc}\n" | |||
|
133 | a | |||
|
134 | $ hg --cwd d qpush -a | |||
|
135 | applying b.patch | |||
|
136 | now at: b.patch | |||
|
137 | $ hg --cwd d log --template "{desc}\n" | |||
|
138 | imported patch b.patch | |||
|
139 | a | |||
67 |
|
140 | |||
68 | hg serve -p $HGPORT2 -d --pid-file=hg.pid --webdir-conf collections2.conf \ |
|
141 | test --mq works and uses correct repository config | |
69 | -A access-paths.log -E error-paths-1.log |
|
|||
70 | cat hg.pid >> $DAEMON_PIDS |
|
|||
71 |
|
||||
72 | "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/?style=raw' |
|
|||
73 |
|
142 | |||
74 | hg qclone http://localhost:$HGPORT2/a d |
|
143 | $ hg --cwd d outgoing --mq | |
75 | hg --cwd d log --template "{desc}\n" |
|
144 | comparing with http://localhost:*/a/.hg/patches (glob) | |
76 | hg --cwd d qpush -a |
|
145 | searching for changes | |
77 | hg --cwd d log --template "{desc}\n" |
|
146 | no changes found | |
78 |
|
147 | [1] | ||
79 | echo '% test --mq works and uses correct repository config' |
|
148 | $ hg --cwd d log --mq --template '{rev} {desc|firstline}\n' | |
80 | hg --cwd d outgoing --mq | sed "s|$HGPORT2|\$HGPORT2|" |
|
149 | 0 b.patch | |
81 | hg --cwd d log --mq --template '{rev} {desc|firstline}\n' |
|
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now