1 $ cat >> $HGRCPATH <<EOF |
|
2 > [web] |
|
3 > push_ssl = false |
|
4 > allow_push = * |
|
5 > [extensions] |
|
6 > EOF |
|
7 $ echo "states=$(echo $(dirname $TESTDIR))/hgext/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 $ echo "tree" >> savanna |
|
34 $ hg add savanna |
|
35 $ hg ci -m "terrain" |
|
36 $ echo "flore" >> babar |
|
37 $ hg ci -m "children" |
|
38 $ hg log --template='{rev}:{node|short}: {state}\n' |
|
39 3:73585b17392a: published |
|
40 2:3c8695235a32: published |
|
41 1:710fe444b3b0: published |
|
42 0:5caa672bac26: published |
|
43 |
|
44 turn draft on (repo side) |
|
45 $ hg states --clever draft |
|
46 $ hg log --template='{rev}:{node|short}: {state}\n' |
|
47 3:73585b17392a: draft |
|
48 2:3c8695235a32: draft |
|
49 1:710fe444b3b0: published |
|
50 0:5caa672bac26: published |
|
51 |
|
52 test outgoing and push |
|
53 $ hg out ../remote1 --template='{rev}:{node|short}\n' |
|
54 comparing with ../remote1 |
|
55 searching for changes |
|
56 no changes found |
|
57 [1] |
|
58 $ hg push --traceback ../remote1 |
|
59 pushing to ../remote1 |
|
60 searching for changes |
|
61 no changes found |
|
62 |
|
63 $ hg out ../remote2 --template='{rev}:{node|short}\n' |
|
64 comparing with ../remote2 |
|
65 searching for changes |
|
66 0:5caa672bac26 |
|
67 1:710fe444b3b0 |
|
68 $ hg push ../remote2 |
|
69 pushing to ../remote2 |
|
70 searching for changes |
|
71 adding changesets |
|
72 adding manifests |
|
73 adding file changes |
|
74 added 2 changesets with 2 changes to 1 files |
|
75 |
|
76 turn draft off again (repo side) |
|
77 $ hg states --off draft |
|
78 abort: could not disable non empty state draft |
|
79 (You may want to use `hg published 'draftheads()'`) |
|
80 [255] |
|
81 $ hg published tip |
|
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 $ hg states draft |
|
95 $ hg draft --exact 2 |
|
96 |
|
97 test incoming and pull |
|
98 |
|
99 $ hg init ../other1 |
|
100 $ cd ../other1 |
|
101 $ hg incoming ../local --template='{rev}:{node|short}\n' |
|
102 comparing with ../local |
|
103 0:5caa672bac26 |
|
104 1:710fe444b3b0 |
|
105 $ hg pull ../local |
|
106 pulling from ../local |
|
107 requesting all changes |
|
108 adding changesets |
|
109 adding manifests |
|
110 adding file changes |
|
111 added 2 changesets with 2 changes to 1 files |
|
112 (run 'hg update' to get a working copy) |
|
113 $ hg log --template='{rev}:{node|short}\n' |
|
114 1:710fe444b3b0 |
|
115 0:5caa672bac26 |
|
116 $ cd .. |
|
117 $ hg clone local other2 |
|
118 requesting all changes |
|
119 adding changesets |
|
120 adding manifests |
|
121 adding file changes |
|
122 added 2 changesets with 2 changes to 1 files |
|
123 updating to branch default |
|
124 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
125 $ hg -R other2 log --template='{rev}:{node|short}\n' |
|
126 1:710fe444b3b0 |
|
127 0:5caa672bac26 |
|
128 |
|
129 test on http |
|
130 |
|
131 $ hg -R local serve -p $HGPORT -d --pid-file=local.pid |
|
132 $ cat local.pid >> "$DAEMON_PIDS" |
|
133 $ hg clone http://localhost:$HGPORT/ fromhttp |
|
134 requesting all changes |
|
135 adding changesets |
|
136 adding manifests |
|
137 adding file changes |
|
138 added 2 changesets with 2 changes to 1 files |
|
139 updating to branch default |
|
140 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
141 $ hg -R fromhttp log --template='{rev}:{node|short}\n' |
|
142 1:710fe444b3b0 |
|
143 0:5caa672bac26 |
|
144 |
|
145 $ hg init fromhttp2 |
|
146 $ cd fromhttp2 |
|
147 $ hg inc http://localhost:$HGPORT/ --template='{rev}:{node|short}\n' |
|
148 comparing with http://localhost:$HGPORT/ |
|
149 0:5caa672bac26 |
|
150 1:710fe444b3b0 |
|
151 $ hg pull http://localhost:$HGPORT/ |
|
152 pulling from http://localhost:$HGPORT/ |
|
153 requesting all changes |
|
154 adding changesets |
|
155 adding manifests |
|
156 adding file changes |
|
157 added 2 changesets with 2 changes to 1 files |
|
158 (run 'hg update' to get a working copy) |
|
159 $ hg log --template='{rev}:{node|short}\n' |
|
160 1:710fe444b3b0 |
|
161 0:5caa672bac26 |
|
162 $ hg inc http://localhost:$HGPORT/ --template='{rev}:{node|short}\n' |
|
163 comparing with http://localhost:$HGPORT/ |
|
164 searching for changes |
|
165 no changes found |
|
166 [1] |
|
167 |
|
168 turn draft off again (repo side) |
|
169 $ cd .. |
|
170 $ "$TESTDIR/killdaemons.py" |
|
171 $ hg -R local states --off draft |
|
172 abort: could not disable non empty state draft |
|
173 (You may want to use `hg published 'draftheads()'`) |
|
174 [255] |
|
175 $ hg -R local published tip |
|
176 $ hg -R local states --off draft |
|
177 $ hg -R local serve -p $HGPORT -d --pid-file=local.pid |
|
178 $ cat local.pid >> "$DAEMON_PIDS" |
|
179 $ cd fromhttp2 |
|
180 |
|
181 $ hg inc http://localhost:$HGPORT/ --template='{rev}:{node|short}\n' |
|
182 comparing with http://localhost:$HGPORT/ |
|
183 searching for changes |
|
184 2:3c8695235a32 |
|
185 3:73585b17392a |
|
186 $ hg pull http://localhost:$HGPORT/ |
|
187 pulling from http://localhost:$HGPORT/ |
|
188 searching for changes |
|
189 adding changesets |
|
190 adding manifests |
|
191 adding file changes |
|
192 added 2 changesets with 2 changes to 2 files |
|
193 (run 'hg update' to get a working copy) |
|
194 $ cd .. |
|
195 $ "$TESTDIR/killdaemons.py" |
|
196 |
|
197 turn draft on again (repo side) |
|
198 $ hg -R local states draft |
|
199 $ hg init httpto |
|
200 $ hg -R httpto serve -p $HGPORT -d --pid-file=remote.pid |
|
201 $ cat remote.pid >> "$DAEMON_PIDS" |
|
202 $ cd local |
|
203 $ hg out http://localhost:$HGPORT/ --template='{rev}:{node|short}\n' |
|
204 comparing with http://localhost:$HGPORT/ |
|
205 searching for changes |
|
206 0:5caa672bac26 |
|
207 1:710fe444b3b0 |
|
208 2:3c8695235a32 |
|
209 3:73585b17392a |
|
210 $ hg push http://localhost:$HGPORT/ |
|
211 pushing to http://localhost:$HGPORT/ |
|
212 searching for changes |
|
213 remote: adding changesets |
|
214 remote: adding manifests |
|
215 remote: adding file changes |
|
216 remote: added 4 changesets with 4 changes to 2 files |
|
217 $ "$TESTDIR/killdaemons.py" |
|