Show More
@@ -1,5 +1,3 b'' | |||||
1 | adjust to non-default HGPORT, e.g. with run-tests.py -j |
|
|||
2 |
|
||||
3 |
|
|
1 | $ echo "[extensions]" >> $HGRCPATH | |
4 | $ echo "fetch=" >> $HGRCPATH |
|
2 | $ echo "fetch=" >> $HGRCPATH | |
5 |
|
3 | |||
@@ -7,7 +5,7 b' test fetch with default branches only' | |||||
7 |
|
5 | |||
8 | $ hg init a |
|
6 | $ hg init a | |
9 | $ echo a > a/a |
|
7 | $ echo a > a/a | |
10 |
$ hg --cwd a commit - |
|
8 | $ hg --cwd a commit -Ama | |
11 | adding a |
|
9 | adding a | |
12 | $ hg clone a b |
|
10 | $ hg clone a b | |
13 | updating to branch default |
|
11 | updating to branch default | |
@@ -16,10 +14,10 b' test fetch with default branches only' | |||||
16 | updating to branch default |
|
14 | updating to branch default | |
17 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
15 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
18 | $ echo b > a/b |
|
16 | $ echo b > a/b | |
19 |
$ hg --cwd a commit - |
|
17 | $ hg --cwd a commit -Amb | |
20 | adding b |
|
18 | adding b | |
21 | $ hg --cwd a parents -q |
|
19 | $ hg --cwd a parents -q | |
22 | 1:97d72e5f12c7 |
|
20 | 1:d2ae7f538514 | |
23 |
|
21 | |||
24 | should pull one change |
|
22 | should pull one change | |
25 |
|
23 | |||
@@ -32,9 +30,9 b' should pull one change' | |||||
32 | added 1 changesets with 1 changes to 1 files |
|
30 | added 1 changesets with 1 changes to 1 files | |
33 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
31 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
34 | $ hg --cwd b parents -q |
|
32 | $ hg --cwd b parents -q | |
35 | 1:97d72e5f12c7 |
|
33 | 1:d2ae7f538514 | |
36 | $ echo c > c/c |
|
34 | $ echo c > c/c | |
37 |
$ hg --cwd c commit - |
|
35 | $ hg --cwd c commit -Amc | |
38 | adding c |
|
36 | adding c | |
39 | $ hg clone c d |
|
37 | $ hg clone c d | |
40 | updating to branch default |
|
38 | updating to branch default | |
@@ -48,39 +46,37 b' repo, because the path of the repo will ' | |||||
48 | message, making every commit appear different. |
|
46 | message, making every commit appear different. | |
49 | should merge c into a |
|
47 | should merge c into a | |
50 |
|
48 | |||
51 |
$ hg --cwd c fetch -d ' |
|
49 | $ hg --cwd c fetch -d '0 0' -m 'automated merge' ../a | |
52 | pulling from ../a |
|
50 | pulling from ../a | |
53 | searching for changes |
|
51 | searching for changes | |
54 | adding changesets |
|
52 | adding changesets | |
55 | adding manifests |
|
53 | adding manifests | |
56 | adding file changes |
|
54 | adding file changes | |
57 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
55 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
58 |
updating to 2: |
|
56 | updating to 2:d2ae7f538514 | |
59 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
57 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
60 |
merging with 1: |
|
58 | merging with 1:d36c0562f908 | |
61 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
59 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
62 |
new changeset 3: |
|
60 | new changeset 3:a323a0c43ec4 merges remote changes with local | |
63 | $ ls c |
|
61 | $ ls c | |
64 | a |
|
62 | a | |
65 | b |
|
63 | b | |
66 | c |
|
64 | c | |
67 | $ netstat -tnap 2>/dev/null | grep $HGPORT | grep LISTEN |
|
|||
68 | [1] |
|
|||
69 | $ hg --cwd a serve -a localhost -p $HGPORT -d --pid-file=hg.pid |
|
65 | $ hg --cwd a serve -a localhost -p $HGPORT -d --pid-file=hg.pid | |
70 | $ cat a/hg.pid >> "$DAEMON_PIDS" |
|
66 | $ cat a/hg.pid >> "$DAEMON_PIDS" | |
71 |
|
67 | |||
72 | fetch over http, no auth |
|
68 | fetch over http, no auth | |
73 |
|
69 | |||
74 |
$ hg --cwd d fetch |
|
70 | $ hg --cwd d fetch http://localhost:$HGPORT/ | |
75 | pulling from http://localhost:$HGPORT/ |
|
71 | pulling from http://localhost:$HGPORT/ | |
76 | searching for changes |
|
72 | searching for changes | |
77 | adding changesets |
|
73 | adding changesets | |
78 | adding manifests |
|
74 | adding manifests | |
79 | adding file changes |
|
75 | adding file changes | |
80 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
76 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
81 |
updating to 2: |
|
77 | updating to 2:d2ae7f538514 | |
82 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
78 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
83 |
merging with 1: |
|
79 | merging with 1:d36c0562f908 | |
84 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
80 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
85 | new changeset 3:* merges remote changes with local (glob) |
|
81 | new changeset 3:* merges remote changes with local (glob) | |
86 | $ hg --cwd d tip --template '{desc}\n' |
|
82 | $ hg --cwd d tip --template '{desc}\n' | |
@@ -88,16 +84,16 b' fetch over http, no auth' | |||||
88 |
|
84 | |||
89 | fetch over http with auth (should be hidden in desc) |
|
85 | fetch over http with auth (should be hidden in desc) | |
90 |
|
86 | |||
91 |
$ hg --cwd e fetch |
|
87 | $ hg --cwd e fetch http://user:password@localhost:$HGPORT/ | |
92 | pulling from http://user:***@localhost:$HGPORT/ |
|
88 | pulling from http://user:***@localhost:$HGPORT/ | |
93 | searching for changes |
|
89 | searching for changes | |
94 | adding changesets |
|
90 | adding changesets | |
95 | adding manifests |
|
91 | adding manifests | |
96 | adding file changes |
|
92 | adding file changes | |
97 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
93 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
98 |
updating to 2: |
|
94 | updating to 2:d2ae7f538514 | |
99 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
95 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
100 |
merging with 1: |
|
96 | merging with 1:d36c0562f908 | |
101 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
97 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
102 | new changeset 3:* merges remote changes with local (glob) |
|
98 | new changeset 3:* merges remote changes with local (glob) | |
103 | $ hg --cwd e tip --template '{desc}\n' |
|
99 | $ hg --cwd e tip --template '{desc}\n' | |
@@ -109,17 +105,17 b' fetch over http with auth (should be hid' | |||||
109 | updating to branch default |
|
105 | updating to branch default | |
110 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
106 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
111 | $ echo f > f/f |
|
107 | $ echo f > f/f | |
112 |
$ hg --cwd f ci - |
|
108 | $ hg --cwd f ci -Amf | |
113 | adding f |
|
109 | adding f | |
114 | $ echo g > g/g |
|
110 | $ echo g > g/g | |
115 |
$ hg --cwd g ci - |
|
111 | $ hg --cwd g ci -Amg | |
116 | adding g |
|
112 | adding g | |
117 | $ hg clone -q f h |
|
113 | $ hg clone -q f h | |
118 | $ hg clone -q g i |
|
114 | $ hg clone -q g i | |
119 |
|
115 | |||
120 | should merge f into g |
|
116 | should merge f into g | |
121 |
|
117 | |||
122 |
$ hg --cwd g fetch -d ' |
|
118 | $ hg --cwd g fetch -d '0 0' --switch -m 'automated merge' ../f | |
123 | pulling from ../f |
|
119 | pulling from ../f | |
124 | searching for changes |
|
120 | searching for changes | |
125 | adding changesets |
|
121 | adding changesets | |
@@ -127,9 +123,9 b' should merge f into g' | |||||
127 | adding file changes |
|
123 | adding file changes | |
128 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
124 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
129 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
125 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
130 |
merging with 3: |
|
126 | merging with 3:6343ca3eff20 | |
131 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
127 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
132 |
new changeset 4: |
|
128 | new changeset 4:f7faa0b7d3c6 merges remote changes with local | |
133 | $ rm i/g |
|
129 | $ rm i/g | |
134 |
|
130 | |||
135 | should abort, because i is modified |
|
131 | should abort, because i is modified | |
@@ -142,18 +138,18 b' test fetch with named branches' | |||||
142 |
|
138 | |||
143 | $ hg init nbase |
|
139 | $ hg init nbase | |
144 | $ echo base > nbase/a |
|
140 | $ echo base > nbase/a | |
145 |
$ hg -R nbase ci - |
|
141 | $ hg -R nbase ci -Am base | |
146 | adding a |
|
142 | adding a | |
147 | $ hg -R nbase branch a |
|
143 | $ hg -R nbase branch a | |
148 | marked working directory as branch a |
|
144 | marked working directory as branch a | |
149 | $ echo a > nbase/a |
|
145 | $ echo a > nbase/a | |
150 |
$ hg -R nbase ci - |
|
146 | $ hg -R nbase ci -m a | |
151 | $ hg -R nbase up -C 0 |
|
147 | $ hg -R nbase up -C 0 | |
152 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
148 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
153 | $ hg -R nbase branch b |
|
149 | $ hg -R nbase branch b | |
154 | marked working directory as branch b |
|
150 | marked working directory as branch b | |
155 | $ echo b > nbase/b |
|
151 | $ echo b > nbase/b | |
156 |
$ hg -R nbase ci -A |
|
152 | $ hg -R nbase ci -Am b | |
157 | adding b |
|
153 | adding b | |
158 |
|
154 | |||
159 | pull in change on foreign branch |
|
155 | pull in change on foreign branch | |
@@ -167,10 +163,10 b' pull in change on foreign branch' | |||||
167 | $ hg -R n1 up -C a |
|
163 | $ hg -R n1 up -C a | |
168 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
164 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
169 | $ echo aa > n1/a |
|
165 | $ echo aa > n1/a | |
170 |
$ hg -R n1 ci - |
|
166 | $ hg -R n1 ci -m a1 | |
171 | $ hg -R n2 up -C b |
|
167 | $ hg -R n2 up -C b | |
172 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
168 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
173 |
$ hg -R n2 fetch - |
|
169 | $ hg -R n2 fetch -m 'merge' n1 | |
174 | pulling from n1 |
|
170 | pulling from n1 | |
175 | searching for changes |
|
171 | searching for changes | |
176 | adding changesets |
|
172 | adding changesets | |
@@ -195,14 +191,14 b' pull in changes on both foreign and loca' | |||||
195 | $ hg -R n1 up -C a |
|
191 | $ hg -R n1 up -C a | |
196 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
192 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
197 | $ echo aa > n1/a |
|
193 | $ echo aa > n1/a | |
198 |
$ hg -R n1 ci - |
|
194 | $ hg -R n1 ci -m a1 | |
199 | $ hg -R n1 up -C b |
|
195 | $ hg -R n1 up -C b | |
200 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
196 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
201 | $ echo bb > n1/b |
|
197 | $ echo bb > n1/b | |
202 |
$ hg -R n1 ci - |
|
198 | $ hg -R n1 ci -m b1 | |
203 | $ hg -R n2 up -C b |
|
199 | $ hg -R n2 up -C b | |
204 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
200 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
205 |
$ hg -R n2 fetch - |
|
201 | $ hg -R n2 fetch -m 'merge' n1 | |
206 | pulling from n1 |
|
202 | pulling from n1 | |
207 | searching for changes |
|
203 | searching for changes | |
208 | adding changesets |
|
204 | adding changesets | |
@@ -229,33 +225,33 b' with a local change' | |||||
229 | $ hg -R n1 up -C a |
|
225 | $ hg -R n1 up -C a | |
230 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
226 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
231 | $ echo a1 > n1/a |
|
227 | $ echo a1 > n1/a | |
232 |
$ hg -R n1 ci - |
|
228 | $ hg -R n1 ci -m a1 | |
233 | $ hg -R n1 up -C b |
|
229 | $ hg -R n1 up -C b | |
234 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
230 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
235 | $ echo bb > n1/b |
|
231 | $ echo bb > n1/b | |
236 |
$ hg -R n1 ci - |
|
232 | $ hg -R n1 ci -m b1 | |
237 | $ hg -R n1 up -C 1 |
|
233 | $ hg -R n1 up -C 1 | |
238 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
234 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
239 | $ echo a2 > n1/a |
|
235 | $ echo a2 > n1/a | |
240 |
$ hg -R n1 ci - |
|
236 | $ hg -R n1 ci -m a2 | |
241 | created new head |
|
237 | created new head | |
242 | $ hg -R n2 up -C b |
|
238 | $ hg -R n2 up -C b | |
243 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
239 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
244 | $ echo change >> n2/c |
|
240 | $ echo change >> n2/c | |
245 |
$ hg -R n2 ci -A |
|
241 | $ hg -R n2 ci -A -m local | |
246 | adding c |
|
242 | adding c | |
247 |
$ hg -R n2 fetch -d ' |
|
243 | $ hg -R n2 fetch -d '0 0' -m 'merge' n1 | |
248 | pulling from n1 |
|
244 | pulling from n1 | |
249 | searching for changes |
|
245 | searching for changes | |
250 | adding changesets |
|
246 | adding changesets | |
251 | adding manifests |
|
247 | adding manifests | |
252 | adding file changes |
|
248 | adding file changes | |
253 | added 3 changesets with 3 changes to 2 files (+2 heads) |
|
249 | added 3 changesets with 3 changes to 2 files (+2 heads) | |
254 |
updating to 5: |
|
250 | updating to 5:3c4a837a864f | |
255 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
251 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
256 |
merging with 3: |
|
252 | merging with 3:1267f84a9ea5 | |
257 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
253 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
258 |
new changeset 7: |
|
254 | new changeset 7:2cf2a1261f21 merges remote changes with local | |
259 |
|
255 | |||
260 | parent should be 7 (new merge changeset) |
|
256 | parent should be 7 (new merge changeset) | |
261 |
|
257 | |||
@@ -277,21 +273,21 b' heads) with a local change' | |||||
277 | $ hg -R n1 merge b |
|
273 | $ hg -R n1 merge b | |
278 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
274 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
279 | (branch merge, don't forget to commit) |
|
275 | (branch merge, don't forget to commit) | |
280 |
$ hg -R n1 ci - |
|
276 | $ hg -R n1 ci -m merge | |
281 | $ hg -R n1 up -C 2 |
|
277 | $ hg -R n1 up -C 2 | |
282 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
278 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
283 | $ echo c > n1/a |
|
279 | $ echo c > n1/a | |
284 |
$ hg -R n1 ci - |
|
280 | $ hg -R n1 ci -m c | |
285 | $ hg -R n1 up -C 2 |
|
281 | $ hg -R n1 up -C 2 | |
286 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
282 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
287 | $ echo cc > n1/a |
|
283 | $ echo cc > n1/a | |
288 |
$ hg -R n1 ci - |
|
284 | $ hg -R n1 ci -m cc | |
289 | created new head |
|
285 | created new head | |
290 | $ hg -R n2 up -C b |
|
286 | $ hg -R n2 up -C b | |
291 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
287 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
292 | $ echo change >> n2/b |
|
288 | $ echo change >> n2/b | |
293 |
$ hg -R n2 ci -A |
|
289 | $ hg -R n2 ci -A -m local | |
294 |
$ hg -R n2 fetch - |
|
290 | $ hg -R n2 fetch -m 'merge' n1 | |
295 | pulling from n1 |
|
291 | pulling from n1 | |
296 | searching for changes |
|
292 | searching for changes | |
297 | adding changesets |
|
293 | adding changesets | |
@@ -320,7 +316,7 b' pull in change on different branch than ' | |||||
320 | $ hg -R n1 ci -m next |
|
316 | $ hg -R n1 ci -m next | |
321 | $ hg -R n2 branch topic |
|
317 | $ hg -R n2 branch topic | |
322 | marked working directory as branch topic |
|
318 | marked working directory as branch topic | |
323 |
$ hg -R n2 fetch - |
|
319 | $ hg -R n2 fetch -m merge n1 | |
324 | abort: working dir not at branch tip (use "hg update" to check out branch tip) |
|
320 | abort: working dir not at branch tip (use "hg update" to check out branch tip) | |
325 | [255] |
|
321 | [255] | |
326 |
|
322 | |||
@@ -407,4 +403,3 b' test issue2047' | |||||
407 | adding manifests |
|
403 | adding manifests | |
408 | adding file changes |
|
404 | adding file changes | |
409 | added 1 changesets with 1 changes to 1 files |
|
405 | added 1 changesets with 1 changes to 1 files | |
410 | $ "$TESTDIR/killdaemons.py" |
|
General Comments 0
You need to be logged in to leave comments.
Login now