Mercurial > hg
comparison tests/test-mq-qclone-http.t @ 12463:9f551ca3bb44
tests: unify test-mq-qclone-http
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 26 Sep 2010 13:43:21 -0500 |
parents | tests/test-mq-qclone-http@662b0f9eb148 |
children | d08bb64888bc |
comparison
equal
deleted
inserted
replaced
12462:da2cfdc33fe8 | 12463:9f551ca3bb44 |
---|---|
1 | |
2 $ echo "[extensions]" >> $HGRCPATH | |
3 $ echo "mq=" >> $HGRCPATH | |
4 $ mkdir webdir | |
5 $ cd webdir | |
6 $ hg init a | |
7 $ hg --cwd a qinit -c | |
8 $ echo a > a/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 | |
25 | |
26 $ cat > collections.conf <<EOF | |
27 > [paths] | |
28 > /=$root/** | |
29 > EOF | |
30 $ hg serve -p $HGPORT -d --pid-file=hg.pid --webdir-conf collections.conf \ | |
31 > -A access-paths.log -E error-paths-1.log | |
32 $ cat hg.pid >> $DAEMON_PIDS | |
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 | |
62 | |
63 test with normal collection | |
64 | |
65 $ cat > collections1.conf <<EOF | |
66 > [paths] | |
67 > /=$root/* | |
68 > EOF | |
69 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf collections1.conf \ | |
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 | |
101 | |
102 test with old-style collection | |
103 | |
104 $ cat > collections2.conf <<EOF | |
105 > [collections] | |
106 > $root=$root | |
107 > EOF | |
108 $ hg serve -p $HGPORT2 -d --pid-file=hg.pid --webdir-conf collections2.conf \ | |
109 > -A access-paths.log -E error-paths-1.log | |
110 $ cat hg.pid >> $DAEMON_PIDS | |
111 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/?style=raw' | |
112 200 Script output follows | |
113 | |
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 | |
140 | |
141 test --mq works and uses correct repository config | |
142 | |
143 $ hg --cwd d outgoing --mq | |
144 comparing with http://localhost:*/a/.hg/patches (glob) | |
145 searching for changes | |
146 no changes found | |
147 [1] | |
148 $ hg --cwd d log --mq --template '{rev} {desc|firstline}\n' | |
149 0 b.patch |