Show More
@@ -1,448 +1,460 b'' | |||||
1 | Prepare repo a: |
|
1 | Prepare repo a: | |
2 |
|
2 | |||
3 | $ mkdir a |
|
3 | $ mkdir a | |
4 | $ cd a |
|
4 | $ cd a | |
5 | $ hg init |
|
5 | $ hg init | |
6 | $ echo a > a |
|
6 | $ echo a > a | |
7 | $ hg add a |
|
7 | $ hg add a | |
8 | $ hg commit -m test |
|
8 | $ hg commit -m test | |
9 | $ echo first line > b |
|
9 | $ echo first line > b | |
10 | $ hg add b |
|
10 | $ hg add b | |
11 |
|
11 | |||
12 | Create a non-inlined filelog: |
|
12 | Create a non-inlined filelog: | |
13 |
|
13 | |||
14 | $ python -c 'for x in range(10000): print x' >> data1 |
|
14 | $ python -c 'for x in range(10000): print x' >> data1 | |
15 | $ for j in 0 1 2 3 4 5 6 7 8 9; do |
|
15 | $ for j in 0 1 2 3 4 5 6 7 8 9; do | |
16 | > cat data1 >> b |
|
16 | > cat data1 >> b | |
17 | > hg commit -m test |
|
17 | > hg commit -m test | |
18 | > done |
|
18 | > done | |
19 |
|
19 | |||
20 | List files in store/data (should show a 'b.d'): |
|
20 | List files in store/data (should show a 'b.d'): | |
21 |
|
21 | |||
22 | $ for i in .hg/store/data/*; do |
|
22 | $ for i in .hg/store/data/*; do | |
23 | > echo $i |
|
23 | > echo $i | |
24 | > done |
|
24 | > done | |
25 | .hg/store/data/a.i |
|
25 | .hg/store/data/a.i | |
26 | .hg/store/data/b.d |
|
26 | .hg/store/data/b.d | |
27 | .hg/store/data/b.i |
|
27 | .hg/store/data/b.i | |
28 |
|
28 | |||
29 | Default operation: |
|
29 | Default operation: | |
30 |
|
30 | |||
31 | $ hg clone . ../b |
|
31 | $ hg clone . ../b | |
32 | updating to branch default |
|
32 | updating to branch default | |
33 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
33 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
34 | $ cd ../b |
|
34 | $ cd ../b | |
35 | $ cat a |
|
35 | $ cat a | |
36 | a |
|
36 | a | |
37 | $ hg verify |
|
37 | $ hg verify | |
38 | checking changesets |
|
38 | checking changesets | |
39 | checking manifests |
|
39 | checking manifests | |
40 | crosschecking files in changesets and manifests |
|
40 | crosschecking files in changesets and manifests | |
41 | checking files |
|
41 | checking files | |
42 | 2 files, 11 changesets, 11 total revisions |
|
42 | 2 files, 11 changesets, 11 total revisions | |
43 |
|
43 | |||
|
44 | Invalid dest '' must abort: | |||
|
45 | ||||
|
46 | $ hg clone . '' | |||
|
47 | abort: No such file or directory | |||
|
48 | [255] | |||
|
49 | ||||
44 | No update, with debug option: |
|
50 | No update, with debug option: | |
45 |
|
51 | |||
46 | $ hg --debug clone -U . ../c |
|
52 | $ hg --debug clone -U . ../c | |
47 | linked 8 files |
|
53 | linked 8 files | |
48 | $ cd ../c |
|
54 | $ cd ../c | |
49 | $ cat a 2>/dev/null || echo "a not present" |
|
55 | $ cat a 2>/dev/null || echo "a not present" | |
50 | a not present |
|
56 | a not present | |
51 | $ hg verify |
|
57 | $ hg verify | |
52 | checking changesets |
|
58 | checking changesets | |
53 | checking manifests |
|
59 | checking manifests | |
54 | crosschecking files in changesets and manifests |
|
60 | crosschecking files in changesets and manifests | |
55 | checking files |
|
61 | checking files | |
56 | 2 files, 11 changesets, 11 total revisions |
|
62 | 2 files, 11 changesets, 11 total revisions | |
57 |
|
63 | |||
58 | Default destination: |
|
64 | Default destination: | |
59 |
|
65 | |||
60 | $ mkdir ../d |
|
66 | $ mkdir ../d | |
61 | $ cd ../d |
|
67 | $ cd ../d | |
62 | $ hg clone ../a |
|
68 | $ hg clone ../a | |
63 | destination directory: a |
|
69 | destination directory: a | |
64 | updating to branch default |
|
70 | updating to branch default | |
65 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
71 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
66 | $ cd a |
|
72 | $ cd a | |
67 | $ hg cat a |
|
73 | $ hg cat a | |
68 | a |
|
74 | a | |
69 | $ cd ../.. |
|
75 | $ cd ../.. | |
70 |
|
76 | |||
71 | Check that we drop the 'file:' from the path before writing the .hgrc: |
|
77 | Check that we drop the 'file:' from the path before writing the .hgrc: | |
72 |
|
78 | |||
73 | $ hg clone file:a e |
|
79 | $ hg clone file:a e | |
74 | updating to branch default |
|
80 | updating to branch default | |
75 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
81 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
76 | $ grep 'file:' e/.hg/hgrc |
|
82 | $ grep 'file:' e/.hg/hgrc | |
77 | [1] |
|
83 | [1] | |
78 |
|
84 | |||
79 | Check that path aliases are expanded: |
|
85 | Check that path aliases are expanded: | |
80 |
|
86 | |||
81 | $ hg clone -q -U --config 'paths.foobar=a#0' foobar f |
|
87 | $ hg clone -q -U --config 'paths.foobar=a#0' foobar f | |
82 | $ hg -R f showconfig paths.default |
|
88 | $ hg -R f showconfig paths.default | |
83 | $TESTTMP/a#0 |
|
89 | $TESTTMP/a#0 | |
84 |
|
90 | |||
85 | Use --pull: |
|
91 | Use --pull: | |
86 |
|
92 | |||
87 | $ hg clone --pull a g |
|
93 | $ hg clone --pull a g | |
88 | requesting all changes |
|
94 | requesting all changes | |
89 | adding changesets |
|
95 | adding changesets | |
90 | adding manifests |
|
96 | adding manifests | |
91 | adding file changes |
|
97 | adding file changes | |
92 | added 11 changesets with 11 changes to 2 files |
|
98 | added 11 changesets with 11 changes to 2 files | |
93 | updating to branch default |
|
99 | updating to branch default | |
94 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
100 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
95 | $ hg -R g verify |
|
101 | $ hg -R g verify | |
96 | checking changesets |
|
102 | checking changesets | |
97 | checking manifests |
|
103 | checking manifests | |
98 | crosschecking files in changesets and manifests |
|
104 | crosschecking files in changesets and manifests | |
99 | checking files |
|
105 | checking files | |
100 | 2 files, 11 changesets, 11 total revisions |
|
106 | 2 files, 11 changesets, 11 total revisions | |
101 |
|
107 | |||
|
108 | Invalid dest '' with --pull must abort (issue2528): | |||
|
109 | ||||
|
110 | $ hg clone --pull a '' | |||
|
111 | abort: No such file or directory | |||
|
112 | [255] | |||
|
113 | ||||
102 | Clone to '.': |
|
114 | Clone to '.': | |
103 |
|
115 | |||
104 | $ mkdir h |
|
116 | $ mkdir h | |
105 | $ cd h |
|
117 | $ cd h | |
106 | $ hg clone ../a . |
|
118 | $ hg clone ../a . | |
107 | updating to branch default |
|
119 | updating to branch default | |
108 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
120 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
109 | $ cd .. |
|
121 | $ cd .. | |
110 |
|
122 | |||
111 |
|
123 | |||
112 | *** Tests for option -u *** |
|
124 | *** Tests for option -u *** | |
113 |
|
125 | |||
114 | Adding some more history to repo a: |
|
126 | Adding some more history to repo a: | |
115 |
|
127 | |||
116 | $ cd a |
|
128 | $ cd a | |
117 | $ hg tag ref1 |
|
129 | $ hg tag ref1 | |
118 | $ echo the quick brown fox >a |
|
130 | $ echo the quick brown fox >a | |
119 | $ hg ci -m "hacked default" |
|
131 | $ hg ci -m "hacked default" | |
120 | $ hg up ref1 |
|
132 | $ hg up ref1 | |
121 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
133 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
122 | $ hg branch stable |
|
134 | $ hg branch stable | |
123 | marked working directory as branch stable |
|
135 | marked working directory as branch stable | |
124 | $ echo some text >a |
|
136 | $ echo some text >a | |
125 | $ hg ci -m "starting branch stable" |
|
137 | $ hg ci -m "starting branch stable" | |
126 | $ hg tag ref2 |
|
138 | $ hg tag ref2 | |
127 | $ echo some more text >a |
|
139 | $ echo some more text >a | |
128 | $ hg ci -m "another change for branch stable" |
|
140 | $ hg ci -m "another change for branch stable" | |
129 | $ hg up ref2 |
|
141 | $ hg up ref2 | |
130 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
142 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
131 | $ hg parents |
|
143 | $ hg parents | |
132 | changeset: 13:e8ece76546a6 |
|
144 | changeset: 13:e8ece76546a6 | |
133 | branch: stable |
|
145 | branch: stable | |
134 | tag: ref2 |
|
146 | tag: ref2 | |
135 | parent: 10:a7949464abda |
|
147 | parent: 10:a7949464abda | |
136 | user: test |
|
148 | user: test | |
137 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
149 | date: Thu Jan 01 00:00:00 1970 +0000 | |
138 | summary: starting branch stable |
|
150 | summary: starting branch stable | |
139 |
|
151 | |||
140 |
|
152 | |||
141 | Repo a has two heads: |
|
153 | Repo a has two heads: | |
142 |
|
154 | |||
143 | $ hg heads |
|
155 | $ hg heads | |
144 | changeset: 15:0aae7cf88f0d |
|
156 | changeset: 15:0aae7cf88f0d | |
145 | branch: stable |
|
157 | branch: stable | |
146 | tag: tip |
|
158 | tag: tip | |
147 | user: test |
|
159 | user: test | |
148 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
160 | date: Thu Jan 01 00:00:00 1970 +0000 | |
149 | summary: another change for branch stable |
|
161 | summary: another change for branch stable | |
150 |
|
162 | |||
151 | changeset: 12:f21241060d6a |
|
163 | changeset: 12:f21241060d6a | |
152 | user: test |
|
164 | user: test | |
153 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
165 | date: Thu Jan 01 00:00:00 1970 +0000 | |
154 | summary: hacked default |
|
166 | summary: hacked default | |
155 |
|
167 | |||
156 |
|
168 | |||
157 | $ cd .. |
|
169 | $ cd .. | |
158 |
|
170 | |||
159 |
|
171 | |||
160 | Testing --noupdate with --updaterev (must abort): |
|
172 | Testing --noupdate with --updaterev (must abort): | |
161 |
|
173 | |||
162 | $ hg clone --noupdate --updaterev 1 a ua |
|
174 | $ hg clone --noupdate --updaterev 1 a ua | |
163 | abort: cannot specify both --noupdate and --updaterev |
|
175 | abort: cannot specify both --noupdate and --updaterev | |
164 | [255] |
|
176 | [255] | |
165 |
|
177 | |||
166 |
|
178 | |||
167 | Testing clone -u: |
|
179 | Testing clone -u: | |
168 |
|
180 | |||
169 | $ hg clone -u . a ua |
|
181 | $ hg clone -u . a ua | |
170 | updating to branch stable |
|
182 | updating to branch stable | |
171 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
183 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
172 |
|
184 | |||
173 | Repo ua has both heads: |
|
185 | Repo ua has both heads: | |
174 |
|
186 | |||
175 | $ hg -R ua heads |
|
187 | $ hg -R ua heads | |
176 | changeset: 15:0aae7cf88f0d |
|
188 | changeset: 15:0aae7cf88f0d | |
177 | branch: stable |
|
189 | branch: stable | |
178 | tag: tip |
|
190 | tag: tip | |
179 | user: test |
|
191 | user: test | |
180 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
192 | date: Thu Jan 01 00:00:00 1970 +0000 | |
181 | summary: another change for branch stable |
|
193 | summary: another change for branch stable | |
182 |
|
194 | |||
183 | changeset: 12:f21241060d6a |
|
195 | changeset: 12:f21241060d6a | |
184 | user: test |
|
196 | user: test | |
185 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
197 | date: Thu Jan 01 00:00:00 1970 +0000 | |
186 | summary: hacked default |
|
198 | summary: hacked default | |
187 |
|
199 | |||
188 |
|
200 | |||
189 | Same revision checked out in repo a and ua: |
|
201 | Same revision checked out in repo a and ua: | |
190 |
|
202 | |||
191 | $ hg -R a parents --template "{node|short}\n" |
|
203 | $ hg -R a parents --template "{node|short}\n" | |
192 | e8ece76546a6 |
|
204 | e8ece76546a6 | |
193 | $ hg -R ua parents --template "{node|short}\n" |
|
205 | $ hg -R ua parents --template "{node|short}\n" | |
194 | e8ece76546a6 |
|
206 | e8ece76546a6 | |
195 |
|
207 | |||
196 | $ rm -r ua |
|
208 | $ rm -r ua | |
197 |
|
209 | |||
198 |
|
210 | |||
199 | Testing clone --pull -u: |
|
211 | Testing clone --pull -u: | |
200 |
|
212 | |||
201 | $ hg clone --pull -u . a ua |
|
213 | $ hg clone --pull -u . a ua | |
202 | requesting all changes |
|
214 | requesting all changes | |
203 | adding changesets |
|
215 | adding changesets | |
204 | adding manifests |
|
216 | adding manifests | |
205 | adding file changes |
|
217 | adding file changes | |
206 | added 16 changesets with 16 changes to 3 files (+1 heads) |
|
218 | added 16 changesets with 16 changes to 3 files (+1 heads) | |
207 | updating to branch stable |
|
219 | updating to branch stable | |
208 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
220 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
209 |
|
221 | |||
210 | Repo ua has both heads: |
|
222 | Repo ua has both heads: | |
211 |
|
223 | |||
212 | $ hg -R ua heads |
|
224 | $ hg -R ua heads | |
213 | changeset: 15:0aae7cf88f0d |
|
225 | changeset: 15:0aae7cf88f0d | |
214 | branch: stable |
|
226 | branch: stable | |
215 | tag: tip |
|
227 | tag: tip | |
216 | user: test |
|
228 | user: test | |
217 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
229 | date: Thu Jan 01 00:00:00 1970 +0000 | |
218 | summary: another change for branch stable |
|
230 | summary: another change for branch stable | |
219 |
|
231 | |||
220 | changeset: 12:f21241060d6a |
|
232 | changeset: 12:f21241060d6a | |
221 | user: test |
|
233 | user: test | |
222 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
234 | date: Thu Jan 01 00:00:00 1970 +0000 | |
223 | summary: hacked default |
|
235 | summary: hacked default | |
224 |
|
236 | |||
225 |
|
237 | |||
226 | Same revision checked out in repo a and ua: |
|
238 | Same revision checked out in repo a and ua: | |
227 |
|
239 | |||
228 | $ hg -R a parents --template "{node|short}\n" |
|
240 | $ hg -R a parents --template "{node|short}\n" | |
229 | e8ece76546a6 |
|
241 | e8ece76546a6 | |
230 | $ hg -R ua parents --template "{node|short}\n" |
|
242 | $ hg -R ua parents --template "{node|short}\n" | |
231 | e8ece76546a6 |
|
243 | e8ece76546a6 | |
232 |
|
244 | |||
233 | $ rm -r ua |
|
245 | $ rm -r ua | |
234 |
|
246 | |||
235 |
|
247 | |||
236 | Testing clone -u <branch>: |
|
248 | Testing clone -u <branch>: | |
237 |
|
249 | |||
238 | $ hg clone -u stable a ua |
|
250 | $ hg clone -u stable a ua | |
239 | updating to branch stable |
|
251 | updating to branch stable | |
240 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
252 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
241 |
|
253 | |||
242 | Repo ua has both heads: |
|
254 | Repo ua has both heads: | |
243 |
|
255 | |||
244 | $ hg -R ua heads |
|
256 | $ hg -R ua heads | |
245 | changeset: 15:0aae7cf88f0d |
|
257 | changeset: 15:0aae7cf88f0d | |
246 | branch: stable |
|
258 | branch: stable | |
247 | tag: tip |
|
259 | tag: tip | |
248 | user: test |
|
260 | user: test | |
249 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
261 | date: Thu Jan 01 00:00:00 1970 +0000 | |
250 | summary: another change for branch stable |
|
262 | summary: another change for branch stable | |
251 |
|
263 | |||
252 | changeset: 12:f21241060d6a |
|
264 | changeset: 12:f21241060d6a | |
253 | user: test |
|
265 | user: test | |
254 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
266 | date: Thu Jan 01 00:00:00 1970 +0000 | |
255 | summary: hacked default |
|
267 | summary: hacked default | |
256 |
|
268 | |||
257 |
|
269 | |||
258 | Branch 'stable' is checked out: |
|
270 | Branch 'stable' is checked out: | |
259 |
|
271 | |||
260 | $ hg -R ua parents |
|
272 | $ hg -R ua parents | |
261 | changeset: 15:0aae7cf88f0d |
|
273 | changeset: 15:0aae7cf88f0d | |
262 | branch: stable |
|
274 | branch: stable | |
263 | tag: tip |
|
275 | tag: tip | |
264 | user: test |
|
276 | user: test | |
265 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
277 | date: Thu Jan 01 00:00:00 1970 +0000 | |
266 | summary: another change for branch stable |
|
278 | summary: another change for branch stable | |
267 |
|
279 | |||
268 |
|
280 | |||
269 | $ rm -r ua |
|
281 | $ rm -r ua | |
270 |
|
282 | |||
271 |
|
283 | |||
272 | Testing default checkout: |
|
284 | Testing default checkout: | |
273 |
|
285 | |||
274 | $ hg clone a ua |
|
286 | $ hg clone a ua | |
275 | updating to branch default |
|
287 | updating to branch default | |
276 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
288 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
277 |
|
289 | |||
278 | Repo ua has both heads: |
|
290 | Repo ua has both heads: | |
279 |
|
291 | |||
280 | $ hg -R ua heads |
|
292 | $ hg -R ua heads | |
281 | changeset: 15:0aae7cf88f0d |
|
293 | changeset: 15:0aae7cf88f0d | |
282 | branch: stable |
|
294 | branch: stable | |
283 | tag: tip |
|
295 | tag: tip | |
284 | user: test |
|
296 | user: test | |
285 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
297 | date: Thu Jan 01 00:00:00 1970 +0000 | |
286 | summary: another change for branch stable |
|
298 | summary: another change for branch stable | |
287 |
|
299 | |||
288 | changeset: 12:f21241060d6a |
|
300 | changeset: 12:f21241060d6a | |
289 | user: test |
|
301 | user: test | |
290 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
302 | date: Thu Jan 01 00:00:00 1970 +0000 | |
291 | summary: hacked default |
|
303 | summary: hacked default | |
292 |
|
304 | |||
293 |
|
305 | |||
294 | Branch 'default' is checked out: |
|
306 | Branch 'default' is checked out: | |
295 |
|
307 | |||
296 | $ hg -R ua parents |
|
308 | $ hg -R ua parents | |
297 | changeset: 12:f21241060d6a |
|
309 | changeset: 12:f21241060d6a | |
298 | user: test |
|
310 | user: test | |
299 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
311 | date: Thu Jan 01 00:00:00 1970 +0000 | |
300 | summary: hacked default |
|
312 | summary: hacked default | |
301 |
|
313 | |||
302 |
|
314 | |||
303 | $ rm -r ua |
|
315 | $ rm -r ua | |
304 |
|
316 | |||
305 |
|
317 | |||
306 | Testing #<branch>: |
|
318 | Testing #<branch>: | |
307 |
|
319 | |||
308 | $ hg clone -u . a#stable ua |
|
320 | $ hg clone -u . a#stable ua | |
309 | adding changesets |
|
321 | adding changesets | |
310 | adding manifests |
|
322 | adding manifests | |
311 | adding file changes |
|
323 | adding file changes | |
312 | added 14 changesets with 14 changes to 3 files |
|
324 | added 14 changesets with 14 changes to 3 files | |
313 | updating to branch stable |
|
325 | updating to branch stable | |
314 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
326 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
315 |
|
327 | |||
316 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): |
|
328 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): | |
317 |
|
329 | |||
318 | $ hg -R ua heads |
|
330 | $ hg -R ua heads | |
319 | changeset: 13:0aae7cf88f0d |
|
331 | changeset: 13:0aae7cf88f0d | |
320 | branch: stable |
|
332 | branch: stable | |
321 | tag: tip |
|
333 | tag: tip | |
322 | user: test |
|
334 | user: test | |
323 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
335 | date: Thu Jan 01 00:00:00 1970 +0000 | |
324 | summary: another change for branch stable |
|
336 | summary: another change for branch stable | |
325 |
|
337 | |||
326 | changeset: 10:a7949464abda |
|
338 | changeset: 10:a7949464abda | |
327 | user: test |
|
339 | user: test | |
328 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
340 | date: Thu Jan 01 00:00:00 1970 +0000 | |
329 | summary: test |
|
341 | summary: test | |
330 |
|
342 | |||
331 |
|
343 | |||
332 | Same revision checked out in repo a and ua: |
|
344 | Same revision checked out in repo a and ua: | |
333 |
|
345 | |||
334 | $ hg -R a parents --template "{node|short}\n" |
|
346 | $ hg -R a parents --template "{node|short}\n" | |
335 | e8ece76546a6 |
|
347 | e8ece76546a6 | |
336 | $ hg -R ua parents --template "{node|short}\n" |
|
348 | $ hg -R ua parents --template "{node|short}\n" | |
337 | e8ece76546a6 |
|
349 | e8ece76546a6 | |
338 |
|
350 | |||
339 | $ rm -r ua |
|
351 | $ rm -r ua | |
340 |
|
352 | |||
341 |
|
353 | |||
342 | Testing -u -r <branch>: |
|
354 | Testing -u -r <branch>: | |
343 |
|
355 | |||
344 | $ hg clone -u . -r stable a ua |
|
356 | $ hg clone -u . -r stable a ua | |
345 | adding changesets |
|
357 | adding changesets | |
346 | adding manifests |
|
358 | adding manifests | |
347 | adding file changes |
|
359 | adding file changes | |
348 | added 14 changesets with 14 changes to 3 files |
|
360 | added 14 changesets with 14 changes to 3 files | |
349 | updating to branch stable |
|
361 | updating to branch stable | |
350 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
362 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
351 |
|
363 | |||
352 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): |
|
364 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): | |
353 |
|
365 | |||
354 | $ hg -R ua heads |
|
366 | $ hg -R ua heads | |
355 | changeset: 13:0aae7cf88f0d |
|
367 | changeset: 13:0aae7cf88f0d | |
356 | branch: stable |
|
368 | branch: stable | |
357 | tag: tip |
|
369 | tag: tip | |
358 | user: test |
|
370 | user: test | |
359 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
371 | date: Thu Jan 01 00:00:00 1970 +0000 | |
360 | summary: another change for branch stable |
|
372 | summary: another change for branch stable | |
361 |
|
373 | |||
362 | changeset: 10:a7949464abda |
|
374 | changeset: 10:a7949464abda | |
363 | user: test |
|
375 | user: test | |
364 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
376 | date: Thu Jan 01 00:00:00 1970 +0000 | |
365 | summary: test |
|
377 | summary: test | |
366 |
|
378 | |||
367 |
|
379 | |||
368 | Same revision checked out in repo a and ua: |
|
380 | Same revision checked out in repo a and ua: | |
369 |
|
381 | |||
370 | $ hg -R a parents --template "{node|short}\n" |
|
382 | $ hg -R a parents --template "{node|short}\n" | |
371 | e8ece76546a6 |
|
383 | e8ece76546a6 | |
372 | $ hg -R ua parents --template "{node|short}\n" |
|
384 | $ hg -R ua parents --template "{node|short}\n" | |
373 | e8ece76546a6 |
|
385 | e8ece76546a6 | |
374 |
|
386 | |||
375 | $ rm -r ua |
|
387 | $ rm -r ua | |
376 |
|
388 | |||
377 |
|
389 | |||
378 | Testing -r <branch>: |
|
390 | Testing -r <branch>: | |
379 |
|
391 | |||
380 | $ hg clone -r stable a ua |
|
392 | $ hg clone -r stable a ua | |
381 | adding changesets |
|
393 | adding changesets | |
382 | adding manifests |
|
394 | adding manifests | |
383 | adding file changes |
|
395 | adding file changes | |
384 | added 14 changesets with 14 changes to 3 files |
|
396 | added 14 changesets with 14 changes to 3 files | |
385 | updating to branch stable |
|
397 | updating to branch stable | |
386 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
398 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
387 |
|
399 | |||
388 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): |
|
400 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): | |
389 |
|
401 | |||
390 | $ hg -R ua heads |
|
402 | $ hg -R ua heads | |
391 | changeset: 13:0aae7cf88f0d |
|
403 | changeset: 13:0aae7cf88f0d | |
392 | branch: stable |
|
404 | branch: stable | |
393 | tag: tip |
|
405 | tag: tip | |
394 | user: test |
|
406 | user: test | |
395 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
407 | date: Thu Jan 01 00:00:00 1970 +0000 | |
396 | summary: another change for branch stable |
|
408 | summary: another change for branch stable | |
397 |
|
409 | |||
398 | changeset: 10:a7949464abda |
|
410 | changeset: 10:a7949464abda | |
399 | user: test |
|
411 | user: test | |
400 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
412 | date: Thu Jan 01 00:00:00 1970 +0000 | |
401 | summary: test |
|
413 | summary: test | |
402 |
|
414 | |||
403 |
|
415 | |||
404 | Branch 'stable' is checked out: |
|
416 | Branch 'stable' is checked out: | |
405 |
|
417 | |||
406 | $ hg -R ua parents |
|
418 | $ hg -R ua parents | |
407 | changeset: 13:0aae7cf88f0d |
|
419 | changeset: 13:0aae7cf88f0d | |
408 | branch: stable |
|
420 | branch: stable | |
409 | tag: tip |
|
421 | tag: tip | |
410 | user: test |
|
422 | user: test | |
411 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
423 | date: Thu Jan 01 00:00:00 1970 +0000 | |
412 | summary: another change for branch stable |
|
424 | summary: another change for branch stable | |
413 |
|
425 | |||
414 |
|
426 | |||
415 | $ rm -r ua |
|
427 | $ rm -r ua | |
416 |
|
428 | |||
417 |
|
429 | |||
418 | Issue2267: Error in 1.6 hg.py: TypeError: 'NoneType' object is not |
|
430 | Issue2267: Error in 1.6 hg.py: TypeError: 'NoneType' object is not | |
419 | iterable in addbranchrevs() |
|
431 | iterable in addbranchrevs() | |
420 |
|
432 | |||
421 | $ cat <<EOF > simpleclone.py |
|
433 | $ cat <<EOF > simpleclone.py | |
422 | > from mercurial import ui, hg |
|
434 | > from mercurial import ui, hg | |
423 | > myui = ui.ui() |
|
435 | > myui = ui.ui() | |
424 | > repo = hg.repository(myui, 'a') |
|
436 | > repo = hg.repository(myui, 'a') | |
425 | > hg.clone(myui, repo, dest="ua") |
|
437 | > hg.clone(myui, repo, dest="ua") | |
426 | > EOF |
|
438 | > EOF | |
427 |
|
439 | |||
428 | $ python simpleclone.py |
|
440 | $ python simpleclone.py | |
429 | updating to branch default |
|
441 | updating to branch default | |
430 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
442 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
431 |
|
443 | |||
432 | $ rm -r ua |
|
444 | $ rm -r ua | |
433 |
|
445 | |||
434 | $ cat <<EOF > branchclone.py |
|
446 | $ cat <<EOF > branchclone.py | |
435 | > from mercurial import ui, hg |
|
447 | > from mercurial import ui, hg | |
436 | > myui = ui.ui() |
|
448 | > myui = ui.ui() | |
437 | > repo = hg.repository(myui, 'a') |
|
449 | > repo = hg.repository(myui, 'a') | |
438 | > hg.clone(myui, repo, dest="ua", branch=["stable",]) |
|
450 | > hg.clone(myui, repo, dest="ua", branch=["stable",]) | |
439 | > EOF |
|
451 | > EOF | |
440 |
|
452 | |||
441 | $ python branchclone.py |
|
453 | $ python branchclone.py | |
442 | adding changesets |
|
454 | adding changesets | |
443 | adding manifests |
|
455 | adding manifests | |
444 | adding file changes |
|
456 | adding file changes | |
445 | added 14 changesets with 14 changes to 3 files |
|
457 | added 14 changesets with 14 changes to 3 files | |
446 | updating to branch stable |
|
458 | updating to branch stable | |
447 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
459 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
448 | $ rm -r ua |
|
460 | $ rm -r ua |
General Comments 0
You need to be logged in to leave comments.
Login now