|
1 $ cat >> $HGRCPATH <<EOF |
|
2 > [web] |
|
3 > push_ssl = false |
|
4 > allow_push = * |
|
5 > [extensions] |
|
6 > EOF |
|
7 $ echo "states=$(echo $(dirname $TESTDIR))/states.py" >> $HGRCPATH |
|
8 |
|
9 $ hg init local |
|
10 $ hg init remote1 |
|
11 $ hg init remote2 |
|
12 $ cd local |
|
13 $ echo "celestine" > babar |
|
14 $ hg add babar |
|
15 $ hg ci -m "add babar" |
|
16 $ echo "la veille dame" > babar |
|
17 $ hg ci -m "add dame" |
|
18 $ hg log --template='{rev}:{node|short}: {state}\n' |
|
19 1:710fe444b3b0: published |
|
20 0:5caa672bac26: published |
|
21 $ hg out ../remote1 --template='{rev}:{node|short}\n' |
|
22 comparing with ../remote1 |
|
23 searching for changes |
|
24 0:5caa672bac26 |
|
25 1:710fe444b3b0 |
|
26 $ hg push ../remote1 |
|
27 pushing to ../remote1 |
|
28 searching for changes |
|
29 adding changesets |
|
30 adding manifests |
|
31 adding file changes |
|
32 added 2 changesets with 2 changes to 1 files |
|
33 $ hg setstate published 1 # until we fix push |
|
34 $ echo "tree" >> savanna |
|
35 $ hg add savanna |
|
36 $ hg ci -m "terrain" |
|
37 $ echo "flore" >> babar |
|
38 $ hg ci -m "children" |
|
39 $ hg log --template='{rev}:{node|short}: {state}\n' |
|
40 3:73585b17392a: published |
|
41 2:3c8695235a32: published |
|
42 1:710fe444b3b0: published |
|
43 0:5caa672bac26: published |
|
44 |
|
45 turn draft on (repo side) |
|
46 $ cat > .hg/hgrc << EOF |
|
47 > [states] |
|
48 > draft=yes |
|
49 > EOF |
|
50 $ hg log --template='{rev}:{node|short}: {state}\n' |
|
51 3:73585b17392a: draft |
|
52 2:3c8695235a32: draft |
|
53 1:710fe444b3b0: published |
|
54 0:5caa672bac26: published |
|
55 |
|
56 test outgoing and push |
|
57 $ hg out ../remote1 --template='{rev}:{node|short}\n' |
|
58 comparing with ../remote1 |
|
59 searching for changes |
|
60 no changes found |
|
61 [1] |
|
62 $ hg push ../remote1 |
|
63 pushing to ../remote1 |
|
64 searching for changes |
|
65 no changes found |
|
66 |
|
67 $ hg out ../remote2 --template='{rev}:{node|short}\n' |
|
68 comparing with ../remote2 |
|
69 searching for changes |
|
70 0:5caa672bac26 |
|
71 1:710fe444b3b0 |
|
72 $ hg push ../remote2 |
|
73 pushing to ../remote2 |
|
74 searching for changes |
|
75 adding changesets |
|
76 adding manifests |
|
77 adding file changes |
|
78 added 2 changesets with 2 changes to 1 files |
|
79 |
|
80 turn draft off again (repo side) |
|
81 $ sed -i 's/^draft=.*$/draft=no/' .hg/hgrc |
|
82 $ hg log --template='{rev}:{node|short}: {state}\n' |
|
83 3:73585b17392a: published |
|
84 2:3c8695235a32: published |
|
85 1:710fe444b3b0: published |
|
86 0:5caa672bac26: published |
|
87 $ hg out ../remote1 --template='{rev}:{node|short}\n' |
|
88 comparing with ../remote1 |
|
89 searching for changes |
|
90 2:3c8695235a32 |
|
91 3:73585b17392a |
|
92 |
|
93 turn draft on again (repo side) |
|
94 $ sed -i 's/^draft=.*$/draft=yes/' .hg/hgrc |
|
95 |
|
96 test incoming and pull |
|
97 |
|
98 $ hg init ../other1 |
|
99 $ cd ../other1 |
|
100 $ hg incoming ../local --template='{rev}:{node|short}\n' |
|
101 comparing with ../local |
|
102 0:5caa672bac26 |
|
103 1:710fe444b3b0 |
|
104 $ hg pull ../local |
|
105 pulling from ../local |
|
106 requesting all changes |
|
107 adding changesets |
|
108 adding manifests |
|
109 adding file changes |
|
110 added 2 changesets with 2 changes to 1 files |
|
111 (run 'hg update' to get a working copy) |
|
112 $ hg log --template='{rev}:{node|short}\n' |
|
113 1:710fe444b3b0 |
|
114 0:5caa672bac26 |
|
115 $ cd .. |
|
116 $ hg clone local other2 |
|
117 requesting all changes |
|
118 adding changesets |
|
119 adding manifests |
|
120 adding file changes |
|
121 added 2 changesets with 2 changes to 1 files |
|
122 updating to branch default |
|
123 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
124 $ hg -R other2 log --template='{rev}:{node|short}\n' |
|
125 1:710fe444b3b0 |
|
126 0:5caa672bac26 |
|
127 |
|
128 test on http |
|
129 |
|
130 $ hg -R local serve -p $HGPORT -d --pid-file=local.pid |
|
131 $ cat local.pid >> "$DAEMON_PIDS" |
|
132 $ hg clone http://localhost:$HGPORT/ fromhttp |
|
133 requesting all changes |
|
134 adding changesets |
|
135 adding manifests |
|
136 adding file changes |
|
137 added 2 changesets with 2 changes to 1 files |
|
138 updating to branch default |
|
139 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
140 $ hg -R fromhttp log --template='{rev}:{node|short}\n' |
|
141 1:710fe444b3b0 |
|
142 0:5caa672bac26 |
|
143 |
|
144 $ hg init fromhttp2 |
|
145 $ cd fromhttp2 |
|
146 $ hg inc http://localhost:$HGPORT/ --template='{rev}:{node|short}\n' |
|
147 comparing with http://localhost:$HGPORT/ |
|
148 0:5caa672bac26 |
|
149 1:710fe444b3b0 |
|
150 $ hg pull http://localhost:$HGPORT/ |
|
151 pulling from http://localhost:$HGPORT/ |
|
152 requesting all changes |
|
153 adding changesets |
|
154 adding manifests |
|
155 adding file changes |
|
156 added 2 changesets with 2 changes to 1 files |
|
157 (run 'hg update' to get a working copy) |
|
158 $ hg log --template='{rev}:{node|short}\n' |
|
159 1:710fe444b3b0 |
|
160 0:5caa672bac26 |
|
161 $ hg inc http://localhost:$HGPORT/ --template='{rev}:{node|short}\n' |
|
162 comparing with http://localhost:$HGPORT/ |
|
163 searching for changes |
|
164 no changes found |
|
165 [1] |
|
166 |
|
167 turn draft off again (repo side) |
|
168 $ cd .. |
|
169 $ "$TESTDIR/killdaemons.py" |
|
170 $ sed -i 's/^draft=.*$/draft=off/' ./local/.hg/hgrc |
|
171 $ hg -R local serve -p $HGPORT -d --pid-file=local.pid |
|
172 $ cat local.pid >> "$DAEMON_PIDS" |
|
173 $ cd fromhttp2 |
|
174 |
|
175 $ hg inc http://localhost:$HGPORT/ --template='{rev}:{node|short}\n' |
|
176 comparing with http://localhost:$HGPORT/ |
|
177 searching for changes |
|
178 2:3c8695235a32 |
|
179 3:73585b17392a |
|
180 $ hg pull http://localhost:$HGPORT/ |
|
181 pulling from http://localhost:$HGPORT/ |
|
182 searching for changes |
|
183 adding changesets |
|
184 adding manifests |
|
185 adding file changes |
|
186 added 2 changesets with 2 changes to 2 files |
|
187 (run 'hg update' to get a working copy) |
|
188 $ cd .. |
|
189 $ "$TESTDIR/killdaemons.py" |
|
190 |
|
191 turn draft on again (repo side) |
|
192 $ sed -i 's/^draft=.*$/draft=on/' local/.hg/hgrc |
|
193 $ hg init httpto |
|
194 $ hg -R httpto serve -p $HGPORT -d --pid-file=remote.pid |
|
195 $ cat remote.pid >> "$DAEMON_PIDS" |
|
196 $ cd local |
|
197 $ hg out http://localhost:$HGPORT/ --template='{rev}:{node|short}\n' |
|
198 comparing with http://localhost:$HGPORT/ |
|
199 searching for changes |
|
200 0:5caa672bac26 |
|
201 1:710fe444b3b0 |
|
202 $ hg push http://localhost:$HGPORT/ |
|
203 pushing to http://localhost:$HGPORT/ |
|
204 searching for changes |
|
205 remote: adding changesets |
|
206 remote: adding manifests |
|
207 remote: adding file changes |
|
208 remote: added 2 changesets with 2 changes to 1 files |
|
209 $ "$TESTDIR/killdaemons.py" |