Show More
@@ -1,1089 +1,1087 b'' | |||||
1 | Prepare repo a: |
|
1 | Prepare repo a: | |
2 |
|
2 | |||
3 | $ hg init a |
|
3 | $ hg init a | |
4 | $ cd a |
|
4 | $ cd a | |
5 | $ echo a > a |
|
5 | $ echo a > a | |
6 | $ hg add a |
|
6 | $ hg add a | |
7 | $ hg commit -m test |
|
7 | $ hg commit -m test | |
8 | $ echo first line > b |
|
8 | $ echo first line > b | |
9 | $ hg add b |
|
9 | $ hg add b | |
10 |
|
10 | |||
11 | Create a non-inlined filelog: |
|
11 | Create a non-inlined filelog: | |
12 |
|
12 | |||
13 | $ $PYTHON -c 'file("data1", "wb").write("".join("%s\n" % x for x in range(10000)))' |
|
13 | $ $PYTHON -c 'file("data1", "wb").write("".join("%s\n" % x for x in range(10000)))' | |
14 | $ for j in 0 1 2 3 4 5 6 7 8 9; do |
|
14 | $ for j in 0 1 2 3 4 5 6 7 8 9; do | |
15 | > cat data1 >> b |
|
15 | > cat data1 >> b | |
16 | > hg commit -m test |
|
16 | > hg commit -m test | |
17 | > done |
|
17 | > done | |
18 |
|
18 | |||
19 | List files in store/data (should show a 'b.d'): |
|
19 | List files in store/data (should show a 'b.d'): | |
20 |
|
20 | |||
21 | $ for i in .hg/store/data/*; do |
|
21 | $ for i in .hg/store/data/*; do | |
22 | > echo $i |
|
22 | > echo $i | |
23 | > done |
|
23 | > done | |
24 | .hg/store/data/a.i |
|
24 | .hg/store/data/a.i | |
25 | .hg/store/data/b.d |
|
25 | .hg/store/data/b.d | |
26 | .hg/store/data/b.i |
|
26 | .hg/store/data/b.i | |
27 |
|
27 | |||
28 | Trigger branchcache creation: |
|
28 | Trigger branchcache creation: | |
29 |
|
29 | |||
30 | $ hg branches |
|
30 | $ hg branches | |
31 | default 10:a7949464abda |
|
31 | default 10:a7949464abda | |
32 | $ ls .hg/cache |
|
32 | $ ls .hg/cache | |
33 | branch2-served |
|
33 | branch2-served | |
34 | rbc-names-v1 |
|
34 | rbc-names-v1 | |
35 | rbc-revs-v1 |
|
35 | rbc-revs-v1 | |
36 |
|
36 | |||
37 | Default operation: |
|
37 | Default operation: | |
38 |
|
38 | |||
39 | $ hg clone . ../b |
|
39 | $ hg clone . ../b | |
40 | updating to branch default |
|
40 | updating to branch default | |
41 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
41 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
42 | $ cd ../b |
|
42 | $ cd ../b | |
43 |
|
43 | |||
44 | Ensure branchcache got copied over: |
|
44 | Ensure branchcache got copied over: | |
45 |
|
45 | |||
46 | $ ls .hg/cache |
|
46 | $ ls .hg/cache | |
47 | branch2-served |
|
47 | branch2-served | |
48 |
|
48 | |||
49 | $ cat a |
|
49 | $ cat a | |
50 | a |
|
50 | a | |
51 | $ hg verify |
|
51 | $ hg verify | |
52 | checking changesets |
|
52 | checking changesets | |
53 | checking manifests |
|
53 | checking manifests | |
54 | crosschecking files in changesets and manifests |
|
54 | crosschecking files in changesets and manifests | |
55 | checking files |
|
55 | checking files | |
56 | 2 files, 11 changesets, 11 total revisions |
|
56 | 2 files, 11 changesets, 11 total revisions | |
57 |
|
57 | |||
58 | Invalid dest '' must abort: |
|
58 | Invalid dest '' must abort: | |
59 |
|
59 | |||
60 | $ hg clone . '' |
|
60 | $ hg clone . '' | |
61 | abort: empty destination path is not valid |
|
61 | abort: empty destination path is not valid | |
62 | [255] |
|
62 | [255] | |
63 |
|
63 | |||
64 | No update, with debug option: |
|
64 | No update, with debug option: | |
65 |
|
65 | |||
66 | #if hardlink |
|
66 | #if hardlink | |
67 | $ hg --debug clone -U . ../c --config progress.debug=true |
|
67 | $ hg --debug clone -U . ../c --config progress.debug=true | |
68 | linking: 1 |
|
68 | linking: 1 | |
69 | linking: 2 |
|
69 | linking: 2 | |
70 | linking: 3 |
|
70 | linking: 3 | |
71 | linking: 4 |
|
71 | linking: 4 | |
72 | linking: 5 |
|
72 | linking: 5 | |
73 | linking: 6 |
|
73 | linking: 6 | |
74 | linking: 7 |
|
74 | linking: 7 | |
75 | linking: 8 |
|
75 | linking: 8 | |
76 | linked 8 files |
|
76 | linked 8 files | |
77 | #else |
|
77 | #else | |
78 | $ hg --debug clone -U . ../c --config progress.debug=true |
|
78 | $ hg --debug clone -U . ../c --config progress.debug=true | |
79 | linking: 1 |
|
79 | linking: 1 | |
80 | copying: 2 |
|
80 | copying: 2 | |
81 | copying: 3 |
|
81 | copying: 3 | |
82 | copying: 4 |
|
82 | copying: 4 | |
83 | copying: 5 |
|
83 | copying: 5 | |
84 | copying: 6 |
|
84 | copying: 6 | |
85 | copying: 7 |
|
85 | copying: 7 | |
86 | copying: 8 |
|
86 | copying: 8 | |
87 | copied 8 files |
|
87 | copied 8 files | |
88 | #endif |
|
88 | #endif | |
89 | $ cd ../c |
|
89 | $ cd ../c | |
90 |
|
90 | |||
91 | Ensure branchcache got copied over: |
|
91 | Ensure branchcache got copied over: | |
92 |
|
92 | |||
93 | $ ls .hg/cache |
|
93 | $ ls .hg/cache | |
94 | branch2-served |
|
94 | branch2-served | |
95 |
|
95 | |||
96 | $ cat a 2>/dev/null || echo "a not present" |
|
96 | $ cat a 2>/dev/null || echo "a not present" | |
97 | a not present |
|
97 | a not present | |
98 | $ hg verify |
|
98 | $ hg verify | |
99 | checking changesets |
|
99 | checking changesets | |
100 | checking manifests |
|
100 | checking manifests | |
101 | crosschecking files in changesets and manifests |
|
101 | crosschecking files in changesets and manifests | |
102 | checking files |
|
102 | checking files | |
103 | 2 files, 11 changesets, 11 total revisions |
|
103 | 2 files, 11 changesets, 11 total revisions | |
104 |
|
104 | |||
105 | Default destination: |
|
105 | Default destination: | |
106 |
|
106 | |||
107 | $ mkdir ../d |
|
107 | $ mkdir ../d | |
108 | $ cd ../d |
|
108 | $ cd ../d | |
109 | $ hg clone ../a |
|
109 | $ hg clone ../a | |
110 | destination directory: a |
|
110 | destination directory: a | |
111 | updating to branch default |
|
111 | updating to branch default | |
112 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
112 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
113 | $ cd a |
|
113 | $ cd a | |
114 | $ hg cat a |
|
114 | $ hg cat a | |
115 | a |
|
115 | a | |
116 | $ cd ../.. |
|
116 | $ cd ../.. | |
117 |
|
117 | |||
118 | Check that we drop the 'file:' from the path before writing the .hgrc: |
|
118 | Check that we drop the 'file:' from the path before writing the .hgrc: | |
119 |
|
119 | |||
120 | $ hg clone file:a e |
|
120 | $ hg clone file:a e | |
121 | updating to branch default |
|
121 | updating to branch default | |
122 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
122 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
123 | $ grep 'file:' e/.hg/hgrc |
|
123 | $ grep 'file:' e/.hg/hgrc | |
124 | [1] |
|
124 | [1] | |
125 |
|
125 | |||
126 | Check that path aliases are expanded: |
|
126 | Check that path aliases are expanded: | |
127 |
|
127 | |||
128 | $ hg clone -q -U --config 'paths.foobar=a#0' foobar f |
|
128 | $ hg clone -q -U --config 'paths.foobar=a#0' foobar f | |
129 | $ hg -R f showconfig paths.default |
|
129 | $ hg -R f showconfig paths.default | |
130 | $TESTTMP/a#0 (glob) |
|
130 | $TESTTMP/a#0 (glob) | |
131 |
|
131 | |||
132 | Use --pull: |
|
132 | Use --pull: | |
133 |
|
133 | |||
134 | $ hg clone --pull a g |
|
134 | $ hg clone --pull a g | |
135 | requesting all changes |
|
135 | requesting all changes | |
136 | adding changesets |
|
136 | adding changesets | |
137 | adding manifests |
|
137 | adding manifests | |
138 | adding file changes |
|
138 | adding file changes | |
139 | added 11 changesets with 11 changes to 2 files |
|
139 | added 11 changesets with 11 changes to 2 files | |
140 | updating to branch default |
|
140 | updating to branch default | |
141 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
141 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
142 | $ hg -R g verify |
|
142 | $ hg -R g verify | |
143 | checking changesets |
|
143 | checking changesets | |
144 | checking manifests |
|
144 | checking manifests | |
145 | crosschecking files in changesets and manifests |
|
145 | crosschecking files in changesets and manifests | |
146 | checking files |
|
146 | checking files | |
147 | 2 files, 11 changesets, 11 total revisions |
|
147 | 2 files, 11 changesets, 11 total revisions | |
148 |
|
148 | |||
149 | Invalid dest '' with --pull must abort (issue2528): |
|
149 | Invalid dest '' with --pull must abort (issue2528): | |
150 |
|
150 | |||
151 | $ hg clone --pull a '' |
|
151 | $ hg clone --pull a '' | |
152 | abort: empty destination path is not valid |
|
152 | abort: empty destination path is not valid | |
153 | [255] |
|
153 | [255] | |
154 |
|
154 | |||
155 | Clone to '.': |
|
155 | Clone to '.': | |
156 |
|
156 | |||
157 | $ mkdir h |
|
157 | $ mkdir h | |
158 | $ cd h |
|
158 | $ cd h | |
159 | $ hg clone ../a . |
|
159 | $ hg clone ../a . | |
160 | updating to branch default |
|
160 | updating to branch default | |
161 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
161 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
162 | $ cd .. |
|
162 | $ cd .. | |
163 |
|
163 | |||
164 |
|
164 | |||
165 | *** Tests for option -u *** |
|
165 | *** Tests for option -u *** | |
166 |
|
166 | |||
167 | Adding some more history to repo a: |
|
167 | Adding some more history to repo a: | |
168 |
|
168 | |||
169 | $ cd a |
|
169 | $ cd a | |
170 | $ hg tag ref1 |
|
170 | $ hg tag ref1 | |
171 | $ echo the quick brown fox >a |
|
171 | $ echo the quick brown fox >a | |
172 | $ hg ci -m "hacked default" |
|
172 | $ hg ci -m "hacked default" | |
173 | $ hg up ref1 |
|
173 | $ hg up ref1 | |
174 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
174 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
175 | $ hg branch stable |
|
175 | $ hg branch stable | |
176 | marked working directory as branch stable |
|
176 | marked working directory as branch stable | |
177 | (branches are permanent and global, did you want a bookmark?) |
|
177 | (branches are permanent and global, did you want a bookmark?) | |
178 | $ echo some text >a |
|
178 | $ echo some text >a | |
179 | $ hg ci -m "starting branch stable" |
|
179 | $ hg ci -m "starting branch stable" | |
180 | $ hg tag ref2 |
|
180 | $ hg tag ref2 | |
181 | $ echo some more text >a |
|
181 | $ echo some more text >a | |
182 | $ hg ci -m "another change for branch stable" |
|
182 | $ hg ci -m "another change for branch stable" | |
183 | $ hg up ref2 |
|
183 | $ hg up ref2 | |
184 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
184 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
185 | $ hg parents |
|
185 | $ hg parents | |
186 | changeset: 13:e8ece76546a6 |
|
186 | changeset: 13:e8ece76546a6 | |
187 | branch: stable |
|
187 | branch: stable | |
188 | tag: ref2 |
|
188 | tag: ref2 | |
189 | parent: 10:a7949464abda |
|
189 | parent: 10:a7949464abda | |
190 | user: test |
|
190 | user: test | |
191 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
191 | date: Thu Jan 01 00:00:00 1970 +0000 | |
192 | summary: starting branch stable |
|
192 | summary: starting branch stable | |
193 |
|
193 | |||
194 |
|
194 | |||
195 | Repo a has two heads: |
|
195 | Repo a has two heads: | |
196 |
|
196 | |||
197 | $ hg heads |
|
197 | $ hg heads | |
198 | changeset: 15:0aae7cf88f0d |
|
198 | changeset: 15:0aae7cf88f0d | |
199 | branch: stable |
|
199 | branch: stable | |
200 | tag: tip |
|
200 | tag: tip | |
201 | user: test |
|
201 | user: test | |
202 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
202 | date: Thu Jan 01 00:00:00 1970 +0000 | |
203 | summary: another change for branch stable |
|
203 | summary: another change for branch stable | |
204 |
|
204 | |||
205 | changeset: 12:f21241060d6a |
|
205 | changeset: 12:f21241060d6a | |
206 | user: test |
|
206 | user: test | |
207 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
207 | date: Thu Jan 01 00:00:00 1970 +0000 | |
208 | summary: hacked default |
|
208 | summary: hacked default | |
209 |
|
209 | |||
210 |
|
210 | |||
211 | $ cd .. |
|
211 | $ cd .. | |
212 |
|
212 | |||
213 |
|
213 | |||
214 | Testing --noupdate with --updaterev (must abort): |
|
214 | Testing --noupdate with --updaterev (must abort): | |
215 |
|
215 | |||
216 | $ hg clone --noupdate --updaterev 1 a ua |
|
216 | $ hg clone --noupdate --updaterev 1 a ua | |
217 | abort: cannot specify both --noupdate and --updaterev |
|
217 | abort: cannot specify both --noupdate and --updaterev | |
218 | [255] |
|
218 | [255] | |
219 |
|
219 | |||
220 |
|
220 | |||
221 | Testing clone -u: |
|
221 | Testing clone -u: | |
222 |
|
222 | |||
223 | $ hg clone -u . a ua |
|
223 | $ hg clone -u . a ua | |
224 | updating to branch stable |
|
224 | updating to branch stable | |
225 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
225 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
226 |
|
226 | |||
227 | Repo ua has both heads: |
|
227 | Repo ua has both heads: | |
228 |
|
228 | |||
229 | $ hg -R ua heads |
|
229 | $ hg -R ua heads | |
230 | changeset: 15:0aae7cf88f0d |
|
230 | changeset: 15:0aae7cf88f0d | |
231 | branch: stable |
|
231 | branch: stable | |
232 | tag: tip |
|
232 | tag: tip | |
233 | user: test |
|
233 | user: test | |
234 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
234 | date: Thu Jan 01 00:00:00 1970 +0000 | |
235 | summary: another change for branch stable |
|
235 | summary: another change for branch stable | |
236 |
|
236 | |||
237 | changeset: 12:f21241060d6a |
|
237 | changeset: 12:f21241060d6a | |
238 | user: test |
|
238 | user: test | |
239 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
239 | date: Thu Jan 01 00:00:00 1970 +0000 | |
240 | summary: hacked default |
|
240 | summary: hacked default | |
241 |
|
241 | |||
242 |
|
242 | |||
243 | Same revision checked out in repo a and ua: |
|
243 | Same revision checked out in repo a and ua: | |
244 |
|
244 | |||
245 | $ hg -R a parents --template "{node|short}\n" |
|
245 | $ hg -R a parents --template "{node|short}\n" | |
246 | e8ece76546a6 |
|
246 | e8ece76546a6 | |
247 | $ hg -R ua parents --template "{node|short}\n" |
|
247 | $ hg -R ua parents --template "{node|short}\n" | |
248 | e8ece76546a6 |
|
248 | e8ece76546a6 | |
249 |
|
249 | |||
250 | $ rm -r ua |
|
250 | $ rm -r ua | |
251 |
|
251 | |||
252 |
|
252 | |||
253 | Testing clone --pull -u: |
|
253 | Testing clone --pull -u: | |
254 |
|
254 | |||
255 | $ hg clone --pull -u . a ua |
|
255 | $ hg clone --pull -u . a ua | |
256 | requesting all changes |
|
256 | requesting all changes | |
257 | adding changesets |
|
257 | adding changesets | |
258 | adding manifests |
|
258 | adding manifests | |
259 | adding file changes |
|
259 | adding file changes | |
260 | added 16 changesets with 16 changes to 3 files (+1 heads) |
|
260 | added 16 changesets with 16 changes to 3 files (+1 heads) | |
261 | updating to branch stable |
|
261 | updating to branch stable | |
262 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
262 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
263 |
|
263 | |||
264 | Repo ua has both heads: |
|
264 | Repo ua has both heads: | |
265 |
|
265 | |||
266 | $ hg -R ua heads |
|
266 | $ hg -R ua heads | |
267 | changeset: 15:0aae7cf88f0d |
|
267 | changeset: 15:0aae7cf88f0d | |
268 | branch: stable |
|
268 | branch: stable | |
269 | tag: tip |
|
269 | tag: tip | |
270 | user: test |
|
270 | user: test | |
271 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
271 | date: Thu Jan 01 00:00:00 1970 +0000 | |
272 | summary: another change for branch stable |
|
272 | summary: another change for branch stable | |
273 |
|
273 | |||
274 | changeset: 12:f21241060d6a |
|
274 | changeset: 12:f21241060d6a | |
275 | user: test |
|
275 | user: test | |
276 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
276 | date: Thu Jan 01 00:00:00 1970 +0000 | |
277 | summary: hacked default |
|
277 | summary: hacked default | |
278 |
|
278 | |||
279 |
|
279 | |||
280 | Same revision checked out in repo a and ua: |
|
280 | Same revision checked out in repo a and ua: | |
281 |
|
281 | |||
282 | $ hg -R a parents --template "{node|short}\n" |
|
282 | $ hg -R a parents --template "{node|short}\n" | |
283 | e8ece76546a6 |
|
283 | e8ece76546a6 | |
284 | $ hg -R ua parents --template "{node|short}\n" |
|
284 | $ hg -R ua parents --template "{node|short}\n" | |
285 | e8ece76546a6 |
|
285 | e8ece76546a6 | |
286 |
|
286 | |||
287 | $ rm -r ua |
|
287 | $ rm -r ua | |
288 |
|
288 | |||
289 |
|
289 | |||
290 | Testing clone -u <branch>: |
|
290 | Testing clone -u <branch>: | |
291 |
|
291 | |||
292 | $ hg clone -u stable a ua |
|
292 | $ hg clone -u stable a ua | |
293 | updating to branch stable |
|
293 | updating to branch stable | |
294 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
294 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
295 |
|
295 | |||
296 | Repo ua has both heads: |
|
296 | Repo ua has both heads: | |
297 |
|
297 | |||
298 | $ hg -R ua heads |
|
298 | $ hg -R ua heads | |
299 | changeset: 15:0aae7cf88f0d |
|
299 | changeset: 15:0aae7cf88f0d | |
300 | branch: stable |
|
300 | branch: stable | |
301 | tag: tip |
|
301 | tag: tip | |
302 | user: test |
|
302 | user: test | |
303 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
303 | date: Thu Jan 01 00:00:00 1970 +0000 | |
304 | summary: another change for branch stable |
|
304 | summary: another change for branch stable | |
305 |
|
305 | |||
306 | changeset: 12:f21241060d6a |
|
306 | changeset: 12:f21241060d6a | |
307 | user: test |
|
307 | user: test | |
308 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
308 | date: Thu Jan 01 00:00:00 1970 +0000 | |
309 | summary: hacked default |
|
309 | summary: hacked default | |
310 |
|
310 | |||
311 |
|
311 | |||
312 | Branch 'stable' is checked out: |
|
312 | Branch 'stable' is checked out: | |
313 |
|
313 | |||
314 | $ hg -R ua parents |
|
314 | $ hg -R ua parents | |
315 | changeset: 15:0aae7cf88f0d |
|
315 | changeset: 15:0aae7cf88f0d | |
316 | branch: stable |
|
316 | branch: stable | |
317 | tag: tip |
|
317 | tag: tip | |
318 | user: test |
|
318 | user: test | |
319 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
319 | date: Thu Jan 01 00:00:00 1970 +0000 | |
320 | summary: another change for branch stable |
|
320 | summary: another change for branch stable | |
321 |
|
321 | |||
322 |
|
322 | |||
323 | $ rm -r ua |
|
323 | $ rm -r ua | |
324 |
|
324 | |||
325 |
|
325 | |||
326 | Testing default checkout: |
|
326 | Testing default checkout: | |
327 |
|
327 | |||
328 | $ hg clone a ua |
|
328 | $ hg clone a ua | |
329 | updating to branch default |
|
329 | updating to branch default | |
330 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
330 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
331 |
|
331 | |||
332 | Repo ua has both heads: |
|
332 | Repo ua has both heads: | |
333 |
|
333 | |||
334 | $ hg -R ua heads |
|
334 | $ hg -R ua heads | |
335 | changeset: 15:0aae7cf88f0d |
|
335 | changeset: 15:0aae7cf88f0d | |
336 | branch: stable |
|
336 | branch: stable | |
337 | tag: tip |
|
337 | tag: tip | |
338 | user: test |
|
338 | user: test | |
339 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
339 | date: Thu Jan 01 00:00:00 1970 +0000 | |
340 | summary: another change for branch stable |
|
340 | summary: another change for branch stable | |
341 |
|
341 | |||
342 | changeset: 12:f21241060d6a |
|
342 | changeset: 12:f21241060d6a | |
343 | user: test |
|
343 | user: test | |
344 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
344 | date: Thu Jan 01 00:00:00 1970 +0000 | |
345 | summary: hacked default |
|
345 | summary: hacked default | |
346 |
|
346 | |||
347 |
|
347 | |||
348 | Branch 'default' is checked out: |
|
348 | Branch 'default' is checked out: | |
349 |
|
349 | |||
350 | $ hg -R ua parents |
|
350 | $ hg -R ua parents | |
351 | changeset: 12:f21241060d6a |
|
351 | changeset: 12:f21241060d6a | |
352 | user: test |
|
352 | user: test | |
353 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
353 | date: Thu Jan 01 00:00:00 1970 +0000 | |
354 | summary: hacked default |
|
354 | summary: hacked default | |
355 |
|
355 | |||
356 | Test clone with a branch named "@" (issue3677) |
|
356 | Test clone with a branch named "@" (issue3677) | |
357 |
|
357 | |||
358 | $ hg -R ua branch @ |
|
358 | $ hg -R ua branch @ | |
359 | marked working directory as branch @ |
|
359 | marked working directory as branch @ | |
360 | $ hg -R ua commit -m 'created branch @' |
|
360 | $ hg -R ua commit -m 'created branch @' | |
361 | $ hg clone ua atbranch |
|
361 | $ hg clone ua atbranch | |
362 | updating to branch default |
|
362 | updating to branch default | |
363 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
363 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
364 | $ hg -R atbranch heads |
|
364 | $ hg -R atbranch heads | |
365 | changeset: 16:798b6d97153e |
|
365 | changeset: 16:798b6d97153e | |
366 | branch: @ |
|
366 | branch: @ | |
367 | tag: tip |
|
367 | tag: tip | |
368 | parent: 12:f21241060d6a |
|
368 | parent: 12:f21241060d6a | |
369 | user: test |
|
369 | user: test | |
370 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
370 | date: Thu Jan 01 00:00:00 1970 +0000 | |
371 | summary: created branch @ |
|
371 | summary: created branch @ | |
372 |
|
372 | |||
373 | changeset: 15:0aae7cf88f0d |
|
373 | changeset: 15:0aae7cf88f0d | |
374 | branch: stable |
|
374 | branch: stable | |
375 | user: test |
|
375 | user: test | |
376 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
376 | date: Thu Jan 01 00:00:00 1970 +0000 | |
377 | summary: another change for branch stable |
|
377 | summary: another change for branch stable | |
378 |
|
378 | |||
379 | changeset: 12:f21241060d6a |
|
379 | changeset: 12:f21241060d6a | |
380 | user: test |
|
380 | user: test | |
381 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
381 | date: Thu Jan 01 00:00:00 1970 +0000 | |
382 | summary: hacked default |
|
382 | summary: hacked default | |
383 |
|
383 | |||
384 | $ hg -R atbranch parents |
|
384 | $ hg -R atbranch parents | |
385 | changeset: 12:f21241060d6a |
|
385 | changeset: 12:f21241060d6a | |
386 | user: test |
|
386 | user: test | |
387 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
387 | date: Thu Jan 01 00:00:00 1970 +0000 | |
388 | summary: hacked default |
|
388 | summary: hacked default | |
389 |
|
389 | |||
390 |
|
390 | |||
391 | $ rm -r ua atbranch |
|
391 | $ rm -r ua atbranch | |
392 |
|
392 | |||
393 |
|
393 | |||
394 | Testing #<branch>: |
|
394 | Testing #<branch>: | |
395 |
|
395 | |||
396 | $ hg clone -u . a#stable ua |
|
396 | $ hg clone -u . a#stable ua | |
397 | adding changesets |
|
397 | adding changesets | |
398 | adding manifests |
|
398 | adding manifests | |
399 | adding file changes |
|
399 | adding file changes | |
400 | added 14 changesets with 14 changes to 3 files |
|
400 | added 14 changesets with 14 changes to 3 files | |
401 | updating to branch stable |
|
401 | updating to branch stable | |
402 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
402 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
403 |
|
403 | |||
404 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): |
|
404 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): | |
405 |
|
405 | |||
406 | $ hg -R ua heads |
|
406 | $ hg -R ua heads | |
407 | changeset: 13:0aae7cf88f0d |
|
407 | changeset: 13:0aae7cf88f0d | |
408 | branch: stable |
|
408 | branch: stable | |
409 | tag: tip |
|
409 | tag: tip | |
410 | user: test |
|
410 | user: test | |
411 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
411 | date: Thu Jan 01 00:00:00 1970 +0000 | |
412 | summary: another change for branch stable |
|
412 | summary: another change for branch stable | |
413 |
|
413 | |||
414 | changeset: 10:a7949464abda |
|
414 | changeset: 10:a7949464abda | |
415 | user: test |
|
415 | user: test | |
416 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
416 | date: Thu Jan 01 00:00:00 1970 +0000 | |
417 | summary: test |
|
417 | summary: test | |
418 |
|
418 | |||
419 |
|
419 | |||
420 | Same revision checked out in repo a and ua: |
|
420 | Same revision checked out in repo a and ua: | |
421 |
|
421 | |||
422 | $ hg -R a parents --template "{node|short}\n" |
|
422 | $ hg -R a parents --template "{node|short}\n" | |
423 | e8ece76546a6 |
|
423 | e8ece76546a6 | |
424 | $ hg -R ua parents --template "{node|short}\n" |
|
424 | $ hg -R ua parents --template "{node|short}\n" | |
425 | e8ece76546a6 |
|
425 | e8ece76546a6 | |
426 |
|
426 | |||
427 | $ rm -r ua |
|
427 | $ rm -r ua | |
428 |
|
428 | |||
429 |
|
429 | |||
430 | Testing -u -r <branch>: |
|
430 | Testing -u -r <branch>: | |
431 |
|
431 | |||
432 | $ hg clone -u . -r stable a ua |
|
432 | $ hg clone -u . -r stable a ua | |
433 | adding changesets |
|
433 | adding changesets | |
434 | adding manifests |
|
434 | adding manifests | |
435 | adding file changes |
|
435 | adding file changes | |
436 | added 14 changesets with 14 changes to 3 files |
|
436 | added 14 changesets with 14 changes to 3 files | |
437 | updating to branch stable |
|
437 | updating to branch stable | |
438 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
438 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
439 |
|
439 | |||
440 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): |
|
440 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): | |
441 |
|
441 | |||
442 | $ hg -R ua heads |
|
442 | $ hg -R ua heads | |
443 | changeset: 13:0aae7cf88f0d |
|
443 | changeset: 13:0aae7cf88f0d | |
444 | branch: stable |
|
444 | branch: stable | |
445 | tag: tip |
|
445 | tag: tip | |
446 | user: test |
|
446 | user: test | |
447 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
447 | date: Thu Jan 01 00:00:00 1970 +0000 | |
448 | summary: another change for branch stable |
|
448 | summary: another change for branch stable | |
449 |
|
449 | |||
450 | changeset: 10:a7949464abda |
|
450 | changeset: 10:a7949464abda | |
451 | user: test |
|
451 | user: test | |
452 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
452 | date: Thu Jan 01 00:00:00 1970 +0000 | |
453 | summary: test |
|
453 | summary: test | |
454 |
|
454 | |||
455 |
|
455 | |||
456 | Same revision checked out in repo a and ua: |
|
456 | Same revision checked out in repo a and ua: | |
457 |
|
457 | |||
458 | $ hg -R a parents --template "{node|short}\n" |
|
458 | $ hg -R a parents --template "{node|short}\n" | |
459 | e8ece76546a6 |
|
459 | e8ece76546a6 | |
460 | $ hg -R ua parents --template "{node|short}\n" |
|
460 | $ hg -R ua parents --template "{node|short}\n" | |
461 | e8ece76546a6 |
|
461 | e8ece76546a6 | |
462 |
|
462 | |||
463 | $ rm -r ua |
|
463 | $ rm -r ua | |
464 |
|
464 | |||
465 |
|
465 | |||
466 | Testing -r <branch>: |
|
466 | Testing -r <branch>: | |
467 |
|
467 | |||
468 | $ hg clone -r stable a ua |
|
468 | $ hg clone -r stable a ua | |
469 | adding changesets |
|
469 | adding changesets | |
470 | adding manifests |
|
470 | adding manifests | |
471 | adding file changes |
|
471 | adding file changes | |
472 | added 14 changesets with 14 changes to 3 files |
|
472 | added 14 changesets with 14 changes to 3 files | |
473 | updating to branch stable |
|
473 | updating to branch stable | |
474 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
474 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
475 |
|
475 | |||
476 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): |
|
476 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): | |
477 |
|
477 | |||
478 | $ hg -R ua heads |
|
478 | $ hg -R ua heads | |
479 | changeset: 13:0aae7cf88f0d |
|
479 | changeset: 13:0aae7cf88f0d | |
480 | branch: stable |
|
480 | branch: stable | |
481 | tag: tip |
|
481 | tag: tip | |
482 | user: test |
|
482 | user: test | |
483 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
483 | date: Thu Jan 01 00:00:00 1970 +0000 | |
484 | summary: another change for branch stable |
|
484 | summary: another change for branch stable | |
485 |
|
485 | |||
486 | changeset: 10:a7949464abda |
|
486 | changeset: 10:a7949464abda | |
487 | user: test |
|
487 | user: test | |
488 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
488 | date: Thu Jan 01 00:00:00 1970 +0000 | |
489 | summary: test |
|
489 | summary: test | |
490 |
|
490 | |||
491 |
|
491 | |||
492 | Branch 'stable' is checked out: |
|
492 | Branch 'stable' is checked out: | |
493 |
|
493 | |||
494 | $ hg -R ua parents |
|
494 | $ hg -R ua parents | |
495 | changeset: 13:0aae7cf88f0d |
|
495 | changeset: 13:0aae7cf88f0d | |
496 | branch: stable |
|
496 | branch: stable | |
497 | tag: tip |
|
497 | tag: tip | |
498 | user: test |
|
498 | user: test | |
499 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
499 | date: Thu Jan 01 00:00:00 1970 +0000 | |
500 | summary: another change for branch stable |
|
500 | summary: another change for branch stable | |
501 |
|
501 | |||
502 |
|
502 | |||
503 | $ rm -r ua |
|
503 | $ rm -r ua | |
504 |
|
504 | |||
505 |
|
505 | |||
506 | Issue2267: Error in 1.6 hg.py: TypeError: 'NoneType' object is not |
|
506 | Issue2267: Error in 1.6 hg.py: TypeError: 'NoneType' object is not | |
507 | iterable in addbranchrevs() |
|
507 | iterable in addbranchrevs() | |
508 |
|
508 | |||
509 | $ cat <<EOF > simpleclone.py |
|
509 | $ cat <<EOF > simpleclone.py | |
510 | > from mercurial import ui, hg |
|
510 | > from mercurial import ui, hg | |
511 | > myui = ui.ui() |
|
511 | > myui = ui.ui() | |
512 | > repo = hg.repository(myui, 'a') |
|
512 | > repo = hg.repository(myui, 'a') | |
513 | > hg.clone(myui, {}, repo, dest="ua") |
|
513 | > hg.clone(myui, {}, repo, dest="ua") | |
514 | > EOF |
|
514 | > EOF | |
515 |
|
515 | |||
516 | $ python simpleclone.py |
|
516 | $ python simpleclone.py | |
517 | updating to branch default |
|
517 | updating to branch default | |
518 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
518 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
519 |
|
519 | |||
520 | $ rm -r ua |
|
520 | $ rm -r ua | |
521 |
|
521 | |||
522 | $ cat <<EOF > branchclone.py |
|
522 | $ cat <<EOF > branchclone.py | |
523 | > from mercurial import ui, hg, extensions |
|
523 | > from mercurial import ui, hg, extensions | |
524 | > myui = ui.ui() |
|
524 | > myui = ui.ui() | |
525 | > extensions.loadall(myui) |
|
525 | > extensions.loadall(myui) | |
526 | > repo = hg.repository(myui, 'a') |
|
526 | > repo = hg.repository(myui, 'a') | |
527 | > hg.clone(myui, {}, repo, dest="ua", branch=["stable",]) |
|
527 | > hg.clone(myui, {}, repo, dest="ua", branch=["stable",]) | |
528 | > EOF |
|
528 | > EOF | |
529 |
|
529 | |||
530 | $ python branchclone.py |
|
530 | $ python branchclone.py | |
531 | adding changesets |
|
531 | adding changesets | |
532 | adding manifests |
|
532 | adding manifests | |
533 | adding file changes |
|
533 | adding file changes | |
534 | added 14 changesets with 14 changes to 3 files |
|
534 | added 14 changesets with 14 changes to 3 files | |
535 | updating to branch stable |
|
535 | updating to branch stable | |
536 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
536 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
537 | $ rm -r ua |
|
537 | $ rm -r ua | |
538 |
|
538 | |||
539 |
|
539 | |||
540 | Test clone with special '@' bookmark: |
|
540 | Test clone with special '@' bookmark: | |
541 | $ cd a |
|
541 | $ cd a | |
542 | $ hg bookmark -r a7949464abda @ # branch point of stable from default |
|
542 | $ hg bookmark -r a7949464abda @ # branch point of stable from default | |
543 | $ hg clone . ../i |
|
543 | $ hg clone . ../i | |
544 | updating to bookmark @ |
|
544 | updating to bookmark @ | |
545 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
545 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
546 | $ hg id -i ../i |
|
546 | $ hg id -i ../i | |
547 | a7949464abda |
|
547 | a7949464abda | |
548 | $ rm -r ../i |
|
548 | $ rm -r ../i | |
549 |
|
549 | |||
550 | $ hg bookmark -f -r stable @ |
|
550 | $ hg bookmark -f -r stable @ | |
551 | $ hg bookmarks |
|
551 | $ hg bookmarks | |
552 | @ 15:0aae7cf88f0d |
|
552 | @ 15:0aae7cf88f0d | |
553 | $ hg clone . ../i |
|
553 | $ hg clone . ../i | |
554 | updating to bookmark @ on branch stable |
|
554 | updating to bookmark @ on branch stable | |
555 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
555 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
556 | $ hg id -i ../i |
|
556 | $ hg id -i ../i | |
557 | 0aae7cf88f0d |
|
557 | 0aae7cf88f0d | |
558 | $ cd "$TESTTMP" |
|
558 | $ cd "$TESTTMP" | |
559 |
|
559 | |||
560 |
|
560 | |||
561 | Testing failures: |
|
561 | Testing failures: | |
562 |
|
562 | |||
563 | $ mkdir fail |
|
563 | $ mkdir fail | |
564 | $ cd fail |
|
564 | $ cd fail | |
565 |
|
565 | |||
566 | No local source |
|
566 | No local source | |
567 |
|
567 | |||
568 | $ hg clone a b |
|
568 | $ hg clone a b | |
569 | abort: repository a not found! |
|
569 | abort: repository a not found! | |
570 | [255] |
|
570 | [255] | |
571 |
|
571 | |||
572 | No remote source |
|
572 | No remote source | |
573 |
|
573 | |||
574 | #if windows |
|
574 | #if windows | |
575 | $ hg clone http://127.0.0.1:3121/a b |
|
575 | $ hg clone http://127.0.0.1:3121/a b | |
576 | abort: error: * (glob) |
|
576 | abort: error: * (glob) | |
577 | [255] |
|
577 | [255] | |
578 | #else |
|
578 | #else | |
579 | $ hg clone http://127.0.0.1:3121/a b |
|
579 | $ hg clone http://127.0.0.1:3121/a b | |
580 | abort: error: *refused* (glob) |
|
580 | abort: error: *refused* (glob) | |
581 | [255] |
|
581 | [255] | |
582 | #endif |
|
582 | #endif | |
583 | $ rm -rf b # work around bug with http clone |
|
583 | $ rm -rf b # work around bug with http clone | |
584 |
|
584 | |||
585 |
|
585 | |||
586 | #if unix-permissions no-root |
|
586 | #if unix-permissions no-root | |
587 |
|
587 | |||
588 | Inaccessible source |
|
588 | Inaccessible source | |
589 |
|
589 | |||
590 | $ mkdir a |
|
590 | $ mkdir a | |
591 | $ chmod 000 a |
|
591 | $ chmod 000 a | |
592 | $ hg clone a b |
|
592 | $ hg clone a b | |
593 | abort: repository a not found! |
|
593 | abort: repository a not found! | |
594 | [255] |
|
594 | [255] | |
595 |
|
595 | |||
596 | Inaccessible destination |
|
596 | Inaccessible destination | |
597 |
|
597 | |||
598 | $ hg init b |
|
598 | $ hg init b | |
599 | $ cd b |
|
599 | $ cd b | |
600 | $ hg clone . ../a |
|
600 | $ hg clone . ../a | |
601 | abort: Permission denied: '../a' |
|
601 | abort: Permission denied: '../a' | |
602 | [255] |
|
602 | [255] | |
603 | $ cd .. |
|
603 | $ cd .. | |
604 | $ chmod 700 a |
|
604 | $ chmod 700 a | |
605 | $ rm -r a b |
|
605 | $ rm -r a b | |
606 |
|
606 | |||
607 | #endif |
|
607 | #endif | |
608 |
|
608 | |||
609 |
|
609 | |||
610 | #if fifo |
|
610 | #if fifo | |
611 |
|
611 | |||
612 | Source of wrong type |
|
612 | Source of wrong type | |
613 |
|
613 | |||
614 | $ mkfifo a |
|
614 | $ mkfifo a | |
615 | $ hg clone a b |
|
615 | $ hg clone a b | |
616 | abort: repository a not found! |
|
616 | abort: repository a not found! | |
617 | [255] |
|
617 | [255] | |
618 | $ rm a |
|
618 | $ rm a | |
619 |
|
619 | |||
620 | #endif |
|
620 | #endif | |
621 |
|
621 | |||
622 | Default destination, same directory |
|
622 | Default destination, same directory | |
623 |
|
623 | |||
624 | $ hg init q |
|
624 | $ hg init q | |
625 | $ hg clone q |
|
625 | $ hg clone q | |
626 | destination directory: q |
|
626 | destination directory: q | |
627 | abort: destination 'q' is not empty |
|
627 | abort: destination 'q' is not empty | |
628 | [255] |
|
628 | [255] | |
629 |
|
629 | |||
630 | destination directory not empty |
|
630 | destination directory not empty | |
631 |
|
631 | |||
632 | $ mkdir a |
|
632 | $ mkdir a | |
633 | $ echo stuff > a/a |
|
633 | $ echo stuff > a/a | |
634 | $ hg clone q a |
|
634 | $ hg clone q a | |
635 | abort: destination 'a' is not empty |
|
635 | abort: destination 'a' is not empty | |
636 | [255] |
|
636 | [255] | |
637 |
|
637 | |||
638 |
|
638 | |||
639 | #if unix-permissions no-root |
|
639 | #if unix-permissions no-root | |
640 |
|
640 | |||
641 | leave existing directory in place after clone failure |
|
641 | leave existing directory in place after clone failure | |
642 |
|
642 | |||
643 | $ hg init c |
|
643 | $ hg init c | |
644 | $ cd c |
|
644 | $ cd c | |
645 | $ echo c > c |
|
645 | $ echo c > c | |
646 | $ hg commit -A -m test |
|
646 | $ hg commit -A -m test | |
647 | adding c |
|
647 | adding c | |
648 | $ chmod -rx .hg/store/data |
|
648 | $ chmod -rx .hg/store/data | |
649 | $ cd .. |
|
649 | $ cd .. | |
650 | $ mkdir d |
|
650 | $ mkdir d | |
651 | $ hg clone c d 2> err |
|
651 | $ hg clone c d 2> err | |
652 | [255] |
|
652 | [255] | |
653 | $ test -d d |
|
653 | $ test -d d | |
654 | $ test -d d/.hg |
|
654 | $ test -d d/.hg | |
655 | [1] |
|
655 | [1] | |
656 |
|
656 | |||
657 | re-enable perm to allow deletion |
|
657 | re-enable perm to allow deletion | |
658 |
|
658 | |||
659 | $ chmod +rx c/.hg/store/data |
|
659 | $ chmod +rx c/.hg/store/data | |
660 |
|
660 | |||
661 | #endif |
|
661 | #endif | |
662 |
|
662 | |||
663 | $ cd .. |
|
663 | $ cd .. | |
664 |
|
664 | |||
665 | Test clone from the repository in (emulated) revlog format 0 (issue4203): |
|
665 | Test clone from the repository in (emulated) revlog format 0 (issue4203): | |
666 |
|
666 | |||
667 | $ mkdir issue4203 |
|
667 | $ mkdir issue4203 | |
668 | $ mkdir -p src/.hg |
|
668 | $ mkdir -p src/.hg | |
669 | $ echo foo > src/foo |
|
669 | $ echo foo > src/foo | |
670 | $ hg -R src add src/foo |
|
670 | $ hg -R src add src/foo | |
671 | $ hg -R src commit -m '#0' |
|
671 | $ hg -R src commit -m '#0' | |
672 | $ hg -R src log -q |
|
672 | $ hg -R src log -q | |
673 | 0:e1bab28bca43 |
|
673 | 0:e1bab28bca43 | |
674 | $ hg clone -U -q src dst |
|
674 | $ hg clone -U -q src dst | |
675 | $ hg -R dst log -q |
|
675 | $ hg -R dst log -q | |
676 | 0:e1bab28bca43 |
|
676 | 0:e1bab28bca43 | |
677 |
|
677 | |||
678 | Create repositories to test auto sharing functionality |
|
678 | Create repositories to test auto sharing functionality | |
679 |
|
679 | |||
680 | $ cat >> $HGRCPATH << EOF |
|
680 | $ cat >> $HGRCPATH << EOF | |
681 | > [extensions] |
|
681 | > [extensions] | |
682 | > share= |
|
682 | > share= | |
683 | > EOF |
|
683 | > EOF | |
684 |
|
684 | |||
685 | $ hg init empty |
|
685 | $ hg init empty | |
686 | $ hg init source1a |
|
686 | $ hg init source1a | |
687 | $ cd source1a |
|
687 | $ cd source1a | |
688 | $ echo initial1 > foo |
|
688 | $ echo initial1 > foo | |
689 | $ hg -q commit -A -m initial |
|
689 | $ hg -q commit -A -m initial | |
690 | $ echo second > foo |
|
690 | $ echo second > foo | |
691 | $ hg commit -m second |
|
691 | $ hg commit -m second | |
692 | $ cd .. |
|
692 | $ cd .. | |
693 |
|
693 | |||
694 | $ hg init filteredrev0 |
|
694 | $ hg init filteredrev0 | |
695 | $ cd filteredrev0 |
|
695 | $ cd filteredrev0 | |
696 | $ cat >> .hg/hgrc << EOF |
|
696 | $ cat >> .hg/hgrc << EOF | |
697 | > [experimental] |
|
697 | > [experimental] | |
698 | > evolution=createmarkers |
|
698 | > evolution=createmarkers | |
699 | > EOF |
|
699 | > EOF | |
700 | $ echo initial1 > foo |
|
700 | $ echo initial1 > foo | |
701 | $ hg -q commit -A -m initial0 |
|
701 | $ hg -q commit -A -m initial0 | |
702 | $ hg -q up -r null |
|
702 | $ hg -q up -r null | |
703 | $ echo initial2 > foo |
|
703 | $ echo initial2 > foo | |
704 | $ hg -q commit -A -m initial1 |
|
704 | $ hg -q commit -A -m initial1 | |
705 | $ hg debugobsolete c05d5c47a5cf81401869999f3d05f7d699d2b29a e082c1832e09a7d1e78b7fd49a592d372de854c8 |
|
705 | $ hg debugobsolete c05d5c47a5cf81401869999f3d05f7d699d2b29a e082c1832e09a7d1e78b7fd49a592d372de854c8 | |
706 | $ cd .. |
|
706 | $ cd .. | |
707 |
|
707 | |||
708 | $ hg -q clone --pull source1a source1b |
|
708 | $ hg -q clone --pull source1a source1b | |
709 | $ cd source1a |
|
709 | $ cd source1a | |
710 | $ hg bookmark bookA |
|
710 | $ hg bookmark bookA | |
711 | $ echo 1a > foo |
|
711 | $ echo 1a > foo | |
712 | $ hg commit -m 1a |
|
712 | $ hg commit -m 1a | |
713 | $ cd ../source1b |
|
713 | $ cd ../source1b | |
714 | $ hg -q up -r 0 |
|
714 | $ hg -q up -r 0 | |
715 | $ echo head1 > foo |
|
715 | $ echo head1 > foo | |
716 | $ hg commit -m head1 |
|
716 | $ hg commit -m head1 | |
717 | created new head |
|
717 | created new head | |
718 | $ hg bookmark head1 |
|
718 | $ hg bookmark head1 | |
719 | $ hg -q up -r 0 |
|
719 | $ hg -q up -r 0 | |
720 | $ echo head2 > foo |
|
720 | $ echo head2 > foo | |
721 | $ hg commit -m head2 |
|
721 | $ hg commit -m head2 | |
722 | created new head |
|
722 | created new head | |
723 | $ hg bookmark head2 |
|
723 | $ hg bookmark head2 | |
724 | $ hg -q up -r 0 |
|
724 | $ hg -q up -r 0 | |
725 | $ hg branch branch1 |
|
725 | $ hg branch branch1 | |
726 | marked working directory as branch branch1 |
|
726 | marked working directory as branch branch1 | |
727 | (branches are permanent and global, did you want a bookmark?) |
|
727 | (branches are permanent and global, did you want a bookmark?) | |
728 | $ echo branch1 > foo |
|
728 | $ echo branch1 > foo | |
729 | $ hg commit -m branch1 |
|
729 | $ hg commit -m branch1 | |
730 | $ hg -q up -r 0 |
|
730 | $ hg -q up -r 0 | |
731 | $ hg branch branch2 |
|
731 | $ hg branch branch2 | |
732 | marked working directory as branch branch2 |
|
732 | marked working directory as branch branch2 | |
733 | $ echo branch2 > foo |
|
733 | $ echo branch2 > foo | |
734 | $ hg commit -m branch2 |
|
734 | $ hg commit -m branch2 | |
735 | $ cd .. |
|
735 | $ cd .. | |
736 | $ hg init source2 |
|
736 | $ hg init source2 | |
737 | $ cd source2 |
|
737 | $ cd source2 | |
738 | $ echo initial2 > foo |
|
738 | $ echo initial2 > foo | |
739 | $ hg -q commit -A -m initial2 |
|
739 | $ hg -q commit -A -m initial2 | |
740 | $ echo second > foo |
|
740 | $ echo second > foo | |
741 | $ hg commit -m second |
|
741 | $ hg commit -m second | |
742 | $ cd .. |
|
742 | $ cd .. | |
743 |
|
743 | |||
744 | Clone with auto share from an empty repo should not result in share |
|
744 | Clone with auto share from an empty repo should not result in share | |
745 |
|
745 | |||
746 | $ mkdir share |
|
746 | $ mkdir share | |
747 | $ hg --config share.pool=share clone empty share-empty |
|
747 | $ hg --config share.pool=share clone empty share-empty | |
748 | (not using pooled storage: remote appears to be empty) |
|
748 | (not using pooled storage: remote appears to be empty) | |
749 | updating to branch default |
|
749 | updating to branch default | |
750 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
750 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
751 | $ ls share |
|
751 | $ ls share | |
752 | $ test -d share-empty/.hg/store |
|
752 | $ test -d share-empty/.hg/store | |
753 | $ test -f share-empty/.hg/sharedpath |
|
753 | $ test -f share-empty/.hg/sharedpath | |
754 | [1] |
|
754 | [1] | |
755 |
|
755 | |||
756 | Clone with auto share from a repo with filtered revision 0 should not result in share |
|
756 | Clone with auto share from a repo with filtered revision 0 should not result in share | |
757 |
|
757 | |||
758 | $ hg --config share.pool=share clone filteredrev0 share-filtered |
|
758 | $ hg --config share.pool=share clone filteredrev0 share-filtered | |
759 | (not using pooled storage: unable to resolve identity of remote) |
|
759 | (not using pooled storage: unable to resolve identity of remote) | |
760 | requesting all changes |
|
760 | requesting all changes | |
761 | adding changesets |
|
761 | adding changesets | |
762 | adding manifests |
|
762 | adding manifests | |
763 | adding file changes |
|
763 | adding file changes | |
764 | added 1 changesets with 1 changes to 1 files |
|
764 | added 1 changesets with 1 changes to 1 files | |
765 | updating to branch default |
|
765 | updating to branch default | |
766 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
766 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
767 |
|
767 | |||
768 | Clone from repo with content should result in shared store being created |
|
768 | Clone from repo with content should result in shared store being created | |
769 |
|
769 | |||
770 | $ hg --config share.pool=share clone source1a share-dest1a |
|
770 | $ hg --config share.pool=share clone source1a share-dest1a | |
771 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
771 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
772 | requesting all changes |
|
772 | requesting all changes | |
773 | adding changesets |
|
773 | adding changesets | |
774 | adding manifests |
|
774 | adding manifests | |
775 | adding file changes |
|
775 | adding file changes | |
776 | added 3 changesets with 3 changes to 1 files |
|
776 | added 3 changesets with 3 changes to 1 files | |
777 | searching for changes |
|
777 | searching for changes | |
778 | no changes found |
|
778 | no changes found | |
779 | adding remote bookmark bookA |
|
779 | adding remote bookmark bookA | |
780 | updating working directory |
|
780 | updating working directory | |
781 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
781 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
782 |
|
782 | |||
783 | The shared repo should have been created |
|
783 | The shared repo should have been created | |
784 |
|
784 | |||
785 | $ ls share |
|
785 | $ ls share | |
786 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 |
|
786 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 | |
787 |
|
787 | |||
788 | The destination should point to it |
|
788 | The destination should point to it | |
789 |
|
789 | |||
790 | $ cat share-dest1a/.hg/sharedpath; echo |
|
790 | $ cat share-dest1a/.hg/sharedpath; echo | |
791 | $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg (glob) |
|
791 | $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg (glob) | |
792 |
|
792 | |||
793 | The destination should have bookmarks |
|
793 | The destination should have bookmarks | |
794 |
|
794 | |||
795 | $ hg -R share-dest1a bookmarks |
|
795 | $ hg -R share-dest1a bookmarks | |
796 | bookA 2:e5bfe23c0b47 |
|
796 | bookA 2:e5bfe23c0b47 | |
797 |
|
797 | |||
798 | The default path should be the remote, not the share |
|
798 | The default path should be the remote, not the share | |
799 |
|
799 | |||
800 | $ hg -R share-dest1a config paths.default |
|
800 | $ hg -R share-dest1a config paths.default | |
801 | $TESTTMP/source1a (glob) |
|
801 | $TESTTMP/source1a (glob) | |
802 |
|
802 | |||
803 | Clone with existing share dir should result in pull + share |
|
803 | Clone with existing share dir should result in pull + share | |
804 |
|
804 | |||
805 | $ hg --config share.pool=share clone source1b share-dest1b |
|
805 | $ hg --config share.pool=share clone source1b share-dest1b | |
806 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
806 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
807 | searching for changes |
|
807 | searching for changes | |
808 | adding changesets |
|
808 | adding changesets | |
809 | adding manifests |
|
809 | adding manifests | |
810 | adding file changes |
|
810 | adding file changes | |
811 | added 4 changesets with 4 changes to 1 files (+4 heads) |
|
811 | added 4 changesets with 4 changes to 1 files (+4 heads) | |
812 | adding remote bookmark head1 |
|
812 | adding remote bookmark head1 | |
813 | adding remote bookmark head2 |
|
813 | adding remote bookmark head2 | |
814 | updating working directory |
|
814 | updating working directory | |
815 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
815 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
816 |
|
816 | |||
817 | $ ls share |
|
817 | $ ls share | |
818 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 |
|
818 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 | |
819 |
|
819 | |||
820 | $ cat share-dest1b/.hg/sharedpath; echo |
|
820 | $ cat share-dest1b/.hg/sharedpath; echo | |
821 | $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg (glob) |
|
821 | $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg (glob) | |
822 |
|
822 | |||
823 | We only get bookmarks from the remote, not everything in the share |
|
823 | We only get bookmarks from the remote, not everything in the share | |
824 |
|
824 | |||
825 | $ hg -R share-dest1b bookmarks |
|
825 | $ hg -R share-dest1b bookmarks | |
826 | head1 3:4a8dc1ab4c13 |
|
826 | head1 3:4a8dc1ab4c13 | |
827 | head2 4:99f71071f117 |
|
827 | head2 4:99f71071f117 | |
828 |
|
828 | |||
829 | Default path should be source, not share. |
|
829 | Default path should be source, not share. | |
830 |
|
830 | |||
831 | $ hg -R share-dest1b config paths.default |
|
831 | $ hg -R share-dest1b config paths.default | |
832 | $TESTTMP/source1b (glob) |
|
832 | $TESTTMP/source1b (glob) | |
833 |
|
833 | |||
834 | Checked out revision should be head of default branch |
|
834 | Checked out revision should be head of default branch | |
835 |
|
835 | |||
836 | $ hg -R share-dest1b log -r . |
|
836 | $ hg -R share-dest1b log -r . | |
837 | changeset: 4:99f71071f117 |
|
837 | changeset: 4:99f71071f117 | |
838 | bookmark: head2 |
|
838 | bookmark: head2 | |
839 | parent: 0:b5f04eac9d8f |
|
839 | parent: 0:b5f04eac9d8f | |
840 | user: test |
|
840 | user: test | |
841 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
841 | date: Thu Jan 01 00:00:00 1970 +0000 | |
842 | summary: head2 |
|
842 | summary: head2 | |
843 |
|
843 | |||
844 |
|
844 | |||
845 | Clone from unrelated repo should result in new share |
|
845 | Clone from unrelated repo should result in new share | |
846 |
|
846 | |||
847 | $ hg --config share.pool=share clone source2 share-dest2 |
|
847 | $ hg --config share.pool=share clone source2 share-dest2 | |
848 | (sharing from new pooled repository 22aeff664783fd44c6d9b435618173c118c3448e) |
|
848 | (sharing from new pooled repository 22aeff664783fd44c6d9b435618173c118c3448e) | |
849 | requesting all changes |
|
849 | requesting all changes | |
850 | adding changesets |
|
850 | adding changesets | |
851 | adding manifests |
|
851 | adding manifests | |
852 | adding file changes |
|
852 | adding file changes | |
853 | added 2 changesets with 2 changes to 1 files |
|
853 | added 2 changesets with 2 changes to 1 files | |
854 | searching for changes |
|
854 | searching for changes | |
855 | no changes found |
|
855 | no changes found | |
856 | updating working directory |
|
856 | updating working directory | |
857 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
857 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
858 |
|
858 | |||
859 | $ ls share |
|
859 | $ ls share | |
860 | 22aeff664783fd44c6d9b435618173c118c3448e |
|
860 | 22aeff664783fd44c6d9b435618173c118c3448e | |
861 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 |
|
861 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 | |
862 |
|
862 | |||
863 | remote naming mode works as advertised |
|
863 | remote naming mode works as advertised | |
864 |
|
864 | |||
865 | $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1a share-remote1a |
|
865 | $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1a share-remote1a | |
866 | (sharing from new pooled repository 195bb1fcdb595c14a6c13e0269129ed78f6debde) |
|
866 | (sharing from new pooled repository 195bb1fcdb595c14a6c13e0269129ed78f6debde) | |
867 | requesting all changes |
|
867 | requesting all changes | |
868 | adding changesets |
|
868 | adding changesets | |
869 | adding manifests |
|
869 | adding manifests | |
870 | adding file changes |
|
870 | adding file changes | |
871 | added 3 changesets with 3 changes to 1 files |
|
871 | added 3 changesets with 3 changes to 1 files | |
872 | searching for changes |
|
872 | searching for changes | |
873 | no changes found |
|
873 | no changes found | |
874 | adding remote bookmark bookA |
|
874 | adding remote bookmark bookA | |
875 | updating working directory |
|
875 | updating working directory | |
876 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
876 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
877 |
|
877 | |||
878 | $ ls shareremote |
|
878 | $ ls shareremote | |
879 | 195bb1fcdb595c14a6c13e0269129ed78f6debde |
|
879 | 195bb1fcdb595c14a6c13e0269129ed78f6debde | |
880 |
|
880 | |||
881 | $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1b share-remote1b |
|
881 | $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1b share-remote1b | |
882 | (sharing from new pooled repository c0d4f83847ca2a873741feb7048a45085fd47c46) |
|
882 | (sharing from new pooled repository c0d4f83847ca2a873741feb7048a45085fd47c46) | |
883 | requesting all changes |
|
883 | requesting all changes | |
884 | adding changesets |
|
884 | adding changesets | |
885 | adding manifests |
|
885 | adding manifests | |
886 | adding file changes |
|
886 | adding file changes | |
887 | added 6 changesets with 6 changes to 1 files (+4 heads) |
|
887 | added 6 changesets with 6 changes to 1 files (+4 heads) | |
888 | searching for changes |
|
888 | searching for changes | |
889 | no changes found |
|
889 | no changes found | |
890 | adding remote bookmark head1 |
|
890 | adding remote bookmark head1 | |
891 | adding remote bookmark head2 |
|
891 | adding remote bookmark head2 | |
892 | updating working directory |
|
892 | updating working directory | |
893 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
893 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
894 |
|
894 | |||
895 | $ ls shareremote |
|
895 | $ ls shareremote | |
896 | 195bb1fcdb595c14a6c13e0269129ed78f6debde |
|
896 | 195bb1fcdb595c14a6c13e0269129ed78f6debde | |
897 | c0d4f83847ca2a873741feb7048a45085fd47c46 |
|
897 | c0d4f83847ca2a873741feb7048a45085fd47c46 | |
898 |
|
898 | |||
899 | request to clone a single revision is respected in sharing mode |
|
899 | request to clone a single revision is respected in sharing mode | |
900 |
|
900 | |||
901 | $ hg --config share.pool=sharerevs clone -r 4a8dc1ab4c13 source1b share-1arev |
|
901 | $ hg --config share.pool=sharerevs clone -r 4a8dc1ab4c13 source1b share-1arev | |
902 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
902 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
903 | adding changesets |
|
903 | adding changesets | |
904 | adding manifests |
|
904 | adding manifests | |
905 | adding file changes |
|
905 | adding file changes | |
906 | added 2 changesets with 2 changes to 1 files |
|
906 | added 2 changesets with 2 changes to 1 files | |
907 | no changes found |
|
907 | no changes found | |
908 | adding remote bookmark head1 |
|
908 | adding remote bookmark head1 | |
909 | updating working directory |
|
909 | updating working directory | |
910 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
910 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
911 |
|
911 | |||
912 | $ hg -R share-1arev log -G |
|
912 | $ hg -R share-1arev log -G | |
913 | @ changeset: 1:4a8dc1ab4c13 |
|
913 | @ changeset: 1:4a8dc1ab4c13 | |
914 | | bookmark: head1 |
|
914 | | bookmark: head1 | |
915 | | tag: tip |
|
915 | | tag: tip | |
916 | | user: test |
|
916 | | user: test | |
917 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
917 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
918 | | summary: head1 |
|
918 | | summary: head1 | |
919 | | |
|
919 | | | |
920 | o changeset: 0:b5f04eac9d8f |
|
920 | o changeset: 0:b5f04eac9d8f | |
921 | user: test |
|
921 | user: test | |
922 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
922 | date: Thu Jan 01 00:00:00 1970 +0000 | |
923 | summary: initial |
|
923 | summary: initial | |
924 |
|
924 | |||
925 |
|
925 | |||
926 | making another clone should only pull down requested rev |
|
926 | making another clone should only pull down requested rev | |
927 |
|
927 | |||
928 | $ hg --config share.pool=sharerevs clone -r 99f71071f117 source1b share-1brev |
|
928 | $ hg --config share.pool=sharerevs clone -r 99f71071f117 source1b share-1brev | |
929 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
929 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
930 | searching for changes |
|
930 | searching for changes | |
931 | adding changesets |
|
931 | adding changesets | |
932 | adding manifests |
|
932 | adding manifests | |
933 | adding file changes |
|
933 | adding file changes | |
934 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
934 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
935 | adding remote bookmark head1 |
|
935 | adding remote bookmark head1 | |
936 | adding remote bookmark head2 |
|
936 | adding remote bookmark head2 | |
937 | updating working directory |
|
937 | updating working directory | |
938 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
938 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
939 |
|
939 | |||
940 | $ hg -R share-1brev log -G |
|
940 | $ hg -R share-1brev log -G | |
941 | @ changeset: 2:99f71071f117 |
|
941 | @ changeset: 2:99f71071f117 | |
942 | | bookmark: head2 |
|
942 | | bookmark: head2 | |
943 | | tag: tip |
|
943 | | tag: tip | |
944 | | parent: 0:b5f04eac9d8f |
|
944 | | parent: 0:b5f04eac9d8f | |
945 | | user: test |
|
945 | | user: test | |
946 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
946 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
947 | | summary: head2 |
|
947 | | summary: head2 | |
948 | | |
|
948 | | | |
949 | | o changeset: 1:4a8dc1ab4c13 |
|
949 | | o changeset: 1:4a8dc1ab4c13 | |
950 | |/ bookmark: head1 |
|
950 | |/ bookmark: head1 | |
951 | | user: test |
|
951 | | user: test | |
952 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
952 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
953 | | summary: head1 |
|
953 | | summary: head1 | |
954 | | |
|
954 | | | |
955 | o changeset: 0:b5f04eac9d8f |
|
955 | o changeset: 0:b5f04eac9d8f | |
956 | user: test |
|
956 | user: test | |
957 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
957 | date: Thu Jan 01 00:00:00 1970 +0000 | |
958 | summary: initial |
|
958 | summary: initial | |
959 |
|
959 | |||
960 |
|
960 | |||
961 | Request to clone a single branch is respected in sharing mode |
|
961 | Request to clone a single branch is respected in sharing mode | |
962 |
|
962 | |||
963 | $ hg --config share.pool=sharebranch clone -b branch1 source1b share-1bbranch1 |
|
963 | $ hg --config share.pool=sharebranch clone -b branch1 source1b share-1bbranch1 | |
964 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
964 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
965 | adding changesets |
|
965 | adding changesets | |
966 | adding manifests |
|
966 | adding manifests | |
967 | adding file changes |
|
967 | adding file changes | |
968 | added 2 changesets with 2 changes to 1 files |
|
968 | added 2 changesets with 2 changes to 1 files | |
969 | no changes found |
|
969 | no changes found | |
970 | updating working directory |
|
970 | updating working directory | |
971 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
971 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
972 |
|
972 | |||
973 | $ hg -R share-1bbranch1 log -G |
|
973 | $ hg -R share-1bbranch1 log -G | |
974 | o changeset: 1:5f92a6c1a1b1 |
|
974 | o changeset: 1:5f92a6c1a1b1 | |
975 | | branch: branch1 |
|
975 | | branch: branch1 | |
976 | | tag: tip |
|
976 | | tag: tip | |
977 | | user: test |
|
977 | | user: test | |
978 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
978 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
979 | | summary: branch1 |
|
979 | | summary: branch1 | |
980 | | |
|
980 | | | |
981 | @ changeset: 0:b5f04eac9d8f |
|
981 | @ changeset: 0:b5f04eac9d8f | |
982 | user: test |
|
982 | user: test | |
983 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
983 | date: Thu Jan 01 00:00:00 1970 +0000 | |
984 | summary: initial |
|
984 | summary: initial | |
985 |
|
985 | |||
986 |
|
986 | |||
987 | $ hg --config share.pool=sharebranch clone -b branch2 source1b share-1bbranch2 |
|
987 | $ hg --config share.pool=sharebranch clone -b branch2 source1b share-1bbranch2 | |
988 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
988 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
989 | searching for changes |
|
989 | searching for changes | |
990 | adding changesets |
|
990 | adding changesets | |
991 | adding manifests |
|
991 | adding manifests | |
992 | adding file changes |
|
992 | adding file changes | |
993 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
993 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
994 | updating working directory |
|
994 | updating working directory | |
995 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
995 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
996 |
|
996 | |||
997 | $ hg -R share-1bbranch2 log -G |
|
997 | $ hg -R share-1bbranch2 log -G | |
998 | o changeset: 2:6bacf4683960 |
|
998 | o changeset: 2:6bacf4683960 | |
999 | | branch: branch2 |
|
999 | | branch: branch2 | |
1000 | | tag: tip |
|
1000 | | tag: tip | |
1001 | | parent: 0:b5f04eac9d8f |
|
1001 | | parent: 0:b5f04eac9d8f | |
1002 | | user: test |
|
1002 | | user: test | |
1003 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1003 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1004 | | summary: branch2 |
|
1004 | | summary: branch2 | |
1005 | | |
|
1005 | | | |
1006 | | o changeset: 1:5f92a6c1a1b1 |
|
1006 | | o changeset: 1:5f92a6c1a1b1 | |
1007 | |/ branch: branch1 |
|
1007 | |/ branch: branch1 | |
1008 | | user: test |
|
1008 | | user: test | |
1009 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1009 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1010 | | summary: branch1 |
|
1010 | | summary: branch1 | |
1011 | | |
|
1011 | | | |
1012 | @ changeset: 0:b5f04eac9d8f |
|
1012 | @ changeset: 0:b5f04eac9d8f | |
1013 | user: test |
|
1013 | user: test | |
1014 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1014 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1015 | summary: initial |
|
1015 | summary: initial | |
1016 |
|
1016 | |||
1017 |
|
1017 | |||
1018 | -U is respected in share clone mode |
|
1018 | -U is respected in share clone mode | |
1019 |
|
1019 | |||
1020 | $ hg --config share.pool=share clone -U source1a share-1anowc |
|
1020 | $ hg --config share.pool=share clone -U source1a share-1anowc | |
1021 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
1021 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
1022 | searching for changes |
|
1022 | searching for changes | |
1023 | no changes found |
|
1023 | no changes found | |
1024 | adding remote bookmark bookA |
|
1024 | adding remote bookmark bookA | |
1025 |
|
1025 | |||
1026 | $ ls share-1anowc |
|
1026 | $ ls share-1anowc | |
1027 |
|
1027 | |||
1028 | Test that auto sharing doesn't cause failure of "hg clone local remote" |
|
1028 | Test that auto sharing doesn't cause failure of "hg clone local remote" | |
1029 |
|
1029 | |||
1030 | $ cd $TESTTMP |
|
1030 | $ cd $TESTTMP | |
1031 | $ hg -R a id -r 0 |
|
1031 | $ hg -R a id -r 0 | |
1032 | acb14030fe0a |
|
1032 | acb14030fe0a | |
1033 | $ hg id -R remote -r 0 |
|
1033 | $ hg id -R remote -r 0 | |
1034 | abort: repository remote not found! |
|
1034 | abort: repository remote not found! | |
1035 | [255] |
|
1035 | [255] | |
1036 | $ hg --config share.pool=share -q clone -e "python \"$TESTDIR/dummyssh\"" a ssh://user@dummy/remote |
|
1036 | $ hg --config share.pool=share -q clone -e "python \"$TESTDIR/dummyssh\"" a ssh://user@dummy/remote | |
1037 | $ hg -R remote id -r 0 |
|
1037 | $ hg -R remote id -r 0 | |
1038 | acb14030fe0a |
|
1038 | acb14030fe0a | |
1039 |
|
1039 | |||
1040 | Cloning into pooled storage doesn't race (issue5104) |
|
1040 | Cloning into pooled storage doesn't race (issue5104) | |
1041 |
|
1041 | |||
1042 | $ HGPOSTLOCKDELAY=2.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace1 > race1.log 2>&1 & |
|
1042 | $ HGPOSTLOCKDELAY=2.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace1 > race1.log 2>&1 & | |
1043 | $ HGPRELOCKDELAY=1.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace2 > race2.log 2>&1 |
|
1043 | $ HGPRELOCKDELAY=1.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace2 > race2.log 2>&1 | |
1044 | $ wait |
|
1044 | $ wait | |
1045 |
|
1045 | |||
1046 | $ hg -R share-destrace1 log -r tip |
|
1046 | $ hg -R share-destrace1 log -r tip | |
1047 | changeset: 2:e5bfe23c0b47 |
|
1047 | changeset: 2:e5bfe23c0b47 | |
1048 | bookmark: bookA |
|
1048 | bookmark: bookA | |
1049 | tag: tip |
|
1049 | tag: tip | |
1050 | user: test |
|
1050 | user: test | |
1051 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1051 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1052 | summary: 1a |
|
1052 | summary: 1a | |
1053 |
|
1053 | |||
1054 |
|
1054 | |||
1055 | $ hg -R share-destrace2 log -r tip |
|
1055 | $ hg -R share-destrace2 log -r tip | |
1056 | changeset: 2:e5bfe23c0b47 |
|
1056 | changeset: 2:e5bfe23c0b47 | |
1057 | bookmark: bookA |
|
1057 | bookmark: bookA | |
1058 | tag: tip |
|
1058 | tag: tip | |
1059 | user: test |
|
1059 | user: test | |
1060 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1060 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1061 | summary: 1a |
|
1061 | summary: 1a | |
1062 |
|
1062 | |||
1063 | One repo should be new, the other should be shared from the pool. We |
|
1063 | One repo should be new, the other should be shared from the pool. We | |
1064 | don't care which is which, so we just make sure we always print the |
|
1064 | don't care which is which, so we just make sure we always print the | |
1065 | one containing "new pooled" first, then one one containing "existing |
|
1065 | one containing "new pooled" first, then one one containing "existing | |
1066 | pooled". |
|
1066 | pooled". | |
1067 |
|
1067 | |||
1068 | $ grep 'new pooled' race1.log > /dev/null && cat race1.log || cat race2.log |
|
1068 | $ (grep 'new pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock | |
1069 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
1069 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
1070 | requesting all changes |
|
1070 | requesting all changes | |
1071 | adding changesets |
|
1071 | adding changesets | |
1072 | adding manifests |
|
1072 | adding manifests | |
1073 | adding file changes |
|
1073 | adding file changes | |
1074 | added 3 changesets with 3 changes to 1 files |
|
1074 | added 3 changesets with 3 changes to 1 files | |
1075 | searching for changes |
|
1075 | searching for changes | |
1076 | no changes found |
|
1076 | no changes found | |
1077 | adding remote bookmark bookA |
|
1077 | adding remote bookmark bookA | |
1078 | updating working directory |
|
1078 | updating working directory | |
1079 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1079 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1080 |
|
1080 | |||
1081 | $ grep 'existing pooled' race1.log > /dev/null && cat race1.log || cat race2.log |
|
1081 | $ (grep 'existing pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock | |
1082 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
1082 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
1083 | waiting for lock on repository share-destrace2 held by * (glob) |
|
|||
1084 | got lock after \d+ seconds (re) |
|
|||
1085 | searching for changes |
|
1083 | searching for changes | |
1086 | no changes found |
|
1084 | no changes found | |
1087 | adding remote bookmark bookA |
|
1085 | adding remote bookmark bookA | |
1088 | updating working directory |
|
1086 | updating working directory | |
1089 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1087 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
General Comments 0
You need to be logged in to leave comments.
Login now