Show More
@@ -1,1273 +1,1295 b'' | |||||
1 | #testcases sshv1 sshv2 |
|
1 | #testcases sshv1 sshv2 | |
2 |
|
2 | |||
3 | #if sshv2 |
|
3 | #if sshv2 | |
4 | $ cat >> $HGRCPATH << EOF |
|
4 | $ cat >> $HGRCPATH << EOF | |
5 | > [experimental] |
|
5 | > [experimental] | |
6 | > sshpeer.advertise-v2 = true |
|
6 | > sshpeer.advertise-v2 = true | |
7 | > sshserver.support-v2 = true |
|
7 | > sshserver.support-v2 = true | |
8 | > EOF |
|
8 | > EOF | |
9 | #endif |
|
9 | #endif | |
10 |
|
10 | |||
11 | Prepare repo a: |
|
11 | Prepare repo a: | |
12 |
|
12 | |||
13 | $ hg init a |
|
13 | $ hg init a | |
14 | $ cd a |
|
14 | $ cd a | |
15 | $ echo a > a |
|
15 | $ echo a > a | |
16 | $ hg add a |
|
16 | $ hg add a | |
17 | $ hg commit -m test |
|
17 | $ hg commit -m test | |
18 | $ echo first line > b |
|
18 | $ echo first line > b | |
19 | $ hg add b |
|
19 | $ hg add b | |
20 |
|
20 | |||
21 | Create a non-inlined filelog: |
|
21 | Create a non-inlined filelog: | |
22 |
|
22 | |||
23 | $ $PYTHON -c 'open("data1", "wb").write(b"".join(b"%d\n" % x for x in range(10000)))' |
|
23 | $ $PYTHON -c 'open("data1", "wb").write(b"".join(b"%d\n" % x for x in range(10000)))' | |
24 | $ for j in 0 1 2 3 4 5 6 7 8 9; do |
|
24 | $ for j in 0 1 2 3 4 5 6 7 8 9; do | |
25 | > cat data1 >> b |
|
25 | > cat data1 >> b | |
26 | > hg commit -m test |
|
26 | > hg commit -m test | |
27 | > done |
|
27 | > done | |
28 |
|
28 | |||
29 | List files in store/data (should show a 'b.d'): |
|
29 | List files in store/data (should show a 'b.d'): | |
30 |
|
30 | |||
31 | #if reporevlogstore |
|
31 | #if reporevlogstore | |
32 | $ for i in .hg/store/data/*; do |
|
32 | $ for i in .hg/store/data/*; do | |
33 | > echo $i |
|
33 | > echo $i | |
34 | > done |
|
34 | > done | |
35 | .hg/store/data/a.i |
|
35 | .hg/store/data/a.i | |
36 | .hg/store/data/b.d |
|
36 | .hg/store/data/b.d | |
37 | .hg/store/data/b.i |
|
37 | .hg/store/data/b.i | |
38 | #endif |
|
38 | #endif | |
39 |
|
39 | |||
40 | Trigger branchcache creation: |
|
40 | Trigger branchcache creation: | |
41 |
|
41 | |||
42 | $ hg branches |
|
42 | $ hg branches | |
43 | default 10:a7949464abda |
|
43 | default 10:a7949464abda | |
44 | $ ls .hg/cache |
|
44 | $ ls .hg/cache | |
45 | branch2-served |
|
45 | branch2-served | |
46 | checkisexec (execbit !) |
|
46 | checkisexec (execbit !) | |
47 | checklink (symlink !) |
|
47 | checklink (symlink !) | |
48 | checklink-target (symlink !) |
|
48 | checklink-target (symlink !) | |
49 | checknoexec (execbit !) |
|
49 | checknoexec (execbit !) | |
50 | rbc-names-v1 |
|
50 | rbc-names-v1 | |
51 | rbc-revs-v1 |
|
51 | rbc-revs-v1 | |
52 |
|
52 | |||
53 | Default operation: |
|
53 | Default operation: | |
54 |
|
54 | |||
55 | $ hg clone . ../b |
|
55 | $ hg clone . ../b | |
56 | updating to branch default |
|
56 | updating to branch default | |
57 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
57 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
58 | $ cd ../b |
|
58 | $ cd ../b | |
59 |
|
59 | |||
60 | Ensure branchcache got copied over: |
|
60 | Ensure branchcache got copied over: | |
61 |
|
61 | |||
62 | $ ls .hg/cache |
|
62 | $ ls .hg/cache | |
63 | branch2-served |
|
63 | branch2-served | |
64 | checkisexec (execbit !) |
|
64 | checkisexec (execbit !) | |
65 | checklink (symlink !) |
|
65 | checklink (symlink !) | |
66 | checklink-target (symlink !) |
|
66 | checklink-target (symlink !) | |
67 | rbc-names-v1 |
|
67 | rbc-names-v1 | |
68 | rbc-revs-v1 |
|
68 | rbc-revs-v1 | |
69 |
|
69 | |||
70 | $ cat a |
|
70 | $ cat a | |
71 | a |
|
71 | a | |
72 | $ hg verify |
|
72 | $ hg verify | |
73 | checking changesets |
|
73 | checking changesets | |
74 | checking manifests |
|
74 | checking manifests | |
75 | crosschecking files in changesets and manifests |
|
75 | crosschecking files in changesets and manifests | |
76 | checking files |
|
76 | checking files | |
77 | 2 files, 11 changesets, 11 total revisions |
|
77 | 2 files, 11 changesets, 11 total revisions | |
78 |
|
78 | |||
79 | Invalid dest '' must abort: |
|
79 | Invalid dest '' must abort: | |
80 |
|
80 | |||
81 | $ hg clone . '' |
|
81 | $ hg clone . '' | |
82 | abort: empty destination path is not valid |
|
82 | abort: empty destination path is not valid | |
83 | [255] |
|
83 | [255] | |
84 |
|
84 | |||
85 | No update, with debug option: |
|
85 | No update, with debug option: | |
86 |
|
86 | |||
87 | #if hardlink |
|
87 | #if hardlink | |
88 | $ hg --debug clone -U . ../c --config progress.debug=true |
|
88 | $ hg --debug clone -U . ../c --config progress.debug=true | |
89 | linking: 1 |
|
89 | linking: 1 | |
90 | linking: 2 |
|
90 | linking: 2 | |
91 | linking: 3 |
|
91 | linking: 3 | |
92 | linking: 4 |
|
92 | linking: 4 | |
93 | linking: 5 |
|
93 | linking: 5 | |
94 | linking: 6 |
|
94 | linking: 6 | |
95 | linking: 7 |
|
95 | linking: 7 | |
96 | linking: 8 |
|
96 | linking: 8 | |
97 | linked 8 files |
|
97 | linked 8 files (reporevlogstore !) | |
|
98 | linking: 9 (reposimplestore !) | |||
|
99 | linking: 10 (reposimplestore !) | |||
|
100 | linking: 11 (reposimplestore !) | |||
|
101 | linking: 12 (reposimplestore !) | |||
|
102 | linking: 13 (reposimplestore !) | |||
|
103 | linking: 14 (reposimplestore !) | |||
|
104 | linking: 15 (reposimplestore !) | |||
|
105 | linking: 16 (reposimplestore !) | |||
|
106 | linking: 17 (reposimplestore !) | |||
|
107 | linking: 18 (reposimplestore !) | |||
|
108 | linked 18 files (reposimplestore !) | |||
98 | #else |
|
109 | #else | |
99 | $ hg --debug clone -U . ../c --config progress.debug=true |
|
110 | $ hg --debug clone -U . ../c --config progress.debug=true | |
100 | linking: 1 |
|
111 | linking: 1 | |
101 | copying: 2 |
|
112 | copying: 2 | |
102 | copying: 3 |
|
113 | copying: 3 | |
103 | copying: 4 |
|
114 | copying: 4 | |
104 | copying: 5 |
|
115 | copying: 5 | |
105 | copying: 6 |
|
116 | copying: 6 | |
106 | copying: 7 |
|
117 | copying: 7 | |
107 | copying: 8 |
|
118 | copying: 8 | |
108 | copied 8 files |
|
119 | copied 8 files (reporevlogstore !) | |
|
120 | copying: 9 (reposimplestore !) | |||
|
121 | copying: 10 (reposimplestore !) | |||
|
122 | copying: 11 (reposimplestore !) | |||
|
123 | copying: 12 (reposimplestore !) | |||
|
124 | copying: 13 (reposimplestore !) | |||
|
125 | copying: 14 (reposimplestore !) | |||
|
126 | copying: 15 (reposimplestore !) | |||
|
127 | copying: 16 (reposimplestore !) | |||
|
128 | copying: 17 (reposimplestore !) | |||
|
129 | copying: 18 (reposimplestore !) | |||
|
130 | copied 18 files (reposimplestore !) | |||
109 | #endif |
|
131 | #endif | |
110 | $ cd ../c |
|
132 | $ cd ../c | |
111 |
|
133 | |||
112 | Ensure branchcache got copied over: |
|
134 | Ensure branchcache got copied over: | |
113 |
|
135 | |||
114 | $ ls .hg/cache |
|
136 | $ ls .hg/cache | |
115 | branch2-served |
|
137 | branch2-served | |
116 | rbc-names-v1 |
|
138 | rbc-names-v1 | |
117 | rbc-revs-v1 |
|
139 | rbc-revs-v1 | |
118 |
|
140 | |||
119 | $ cat a 2>/dev/null || echo "a not present" |
|
141 | $ cat a 2>/dev/null || echo "a not present" | |
120 | a not present |
|
142 | a not present | |
121 | $ hg verify |
|
143 | $ hg verify | |
122 | checking changesets |
|
144 | checking changesets | |
123 | checking manifests |
|
145 | checking manifests | |
124 | crosschecking files in changesets and manifests |
|
146 | crosschecking files in changesets and manifests | |
125 | checking files |
|
147 | checking files | |
126 | 2 files, 11 changesets, 11 total revisions |
|
148 | 2 files, 11 changesets, 11 total revisions | |
127 |
|
149 | |||
128 | Default destination: |
|
150 | Default destination: | |
129 |
|
151 | |||
130 | $ mkdir ../d |
|
152 | $ mkdir ../d | |
131 | $ cd ../d |
|
153 | $ cd ../d | |
132 | $ hg clone ../a |
|
154 | $ hg clone ../a | |
133 | destination directory: a |
|
155 | destination directory: a | |
134 | updating to branch default |
|
156 | updating to branch default | |
135 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
157 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
136 | $ cd a |
|
158 | $ cd a | |
137 | $ hg cat a |
|
159 | $ hg cat a | |
138 | a |
|
160 | a | |
139 | $ cd ../.. |
|
161 | $ cd ../.. | |
140 |
|
162 | |||
141 | Check that we drop the 'file:' from the path before writing the .hgrc: |
|
163 | Check that we drop the 'file:' from the path before writing the .hgrc: | |
142 |
|
164 | |||
143 | $ hg clone file:a e |
|
165 | $ hg clone file:a e | |
144 | updating to branch default |
|
166 | updating to branch default | |
145 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
167 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
146 | $ grep 'file:' e/.hg/hgrc |
|
168 | $ grep 'file:' e/.hg/hgrc | |
147 | [1] |
|
169 | [1] | |
148 |
|
170 | |||
149 | Check that path aliases are expanded: |
|
171 | Check that path aliases are expanded: | |
150 |
|
172 | |||
151 | $ hg clone -q -U --config 'paths.foobar=a#0' foobar f |
|
173 | $ hg clone -q -U --config 'paths.foobar=a#0' foobar f | |
152 | $ hg -R f showconfig paths.default |
|
174 | $ hg -R f showconfig paths.default | |
153 | $TESTTMP/a#0 |
|
175 | $TESTTMP/a#0 | |
154 |
|
176 | |||
155 | Use --pull: |
|
177 | Use --pull: | |
156 |
|
178 | |||
157 | $ hg clone --pull a g |
|
179 | $ hg clone --pull a g | |
158 | requesting all changes |
|
180 | requesting all changes | |
159 | adding changesets |
|
181 | adding changesets | |
160 | adding manifests |
|
182 | adding manifests | |
161 | adding file changes |
|
183 | adding file changes | |
162 | added 11 changesets with 11 changes to 2 files |
|
184 | added 11 changesets with 11 changes to 2 files | |
163 | new changesets acb14030fe0a:a7949464abda |
|
185 | new changesets acb14030fe0a:a7949464abda | |
164 | updating to branch default |
|
186 | updating to branch default | |
165 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
187 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
166 | $ hg -R g verify |
|
188 | $ hg -R g verify | |
167 | checking changesets |
|
189 | checking changesets | |
168 | checking manifests |
|
190 | checking manifests | |
169 | crosschecking files in changesets and manifests |
|
191 | crosschecking files in changesets and manifests | |
170 | checking files |
|
192 | checking files | |
171 | 2 files, 11 changesets, 11 total revisions |
|
193 | 2 files, 11 changesets, 11 total revisions | |
172 |
|
194 | |||
173 | Invalid dest '' with --pull must abort (issue2528): |
|
195 | Invalid dest '' with --pull must abort (issue2528): | |
174 |
|
196 | |||
175 | $ hg clone --pull a '' |
|
197 | $ hg clone --pull a '' | |
176 | abort: empty destination path is not valid |
|
198 | abort: empty destination path is not valid | |
177 | [255] |
|
199 | [255] | |
178 |
|
200 | |||
179 | Clone to '.': |
|
201 | Clone to '.': | |
180 |
|
202 | |||
181 | $ mkdir h |
|
203 | $ mkdir h | |
182 | $ cd h |
|
204 | $ cd h | |
183 | $ hg clone ../a . |
|
205 | $ hg clone ../a . | |
184 | updating to branch default |
|
206 | updating to branch default | |
185 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
207 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
186 | $ cd .. |
|
208 | $ cd .. | |
187 |
|
209 | |||
188 |
|
210 | |||
189 | *** Tests for option -u *** |
|
211 | *** Tests for option -u *** | |
190 |
|
212 | |||
191 | Adding some more history to repo a: |
|
213 | Adding some more history to repo a: | |
192 |
|
214 | |||
193 | $ cd a |
|
215 | $ cd a | |
194 | $ hg tag ref1 |
|
216 | $ hg tag ref1 | |
195 | $ echo the quick brown fox >a |
|
217 | $ echo the quick brown fox >a | |
196 | $ hg ci -m "hacked default" |
|
218 | $ hg ci -m "hacked default" | |
197 | $ hg up ref1 |
|
219 | $ hg up ref1 | |
198 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
220 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
199 | $ hg branch stable |
|
221 | $ hg branch stable | |
200 | marked working directory as branch stable |
|
222 | marked working directory as branch stable | |
201 | (branches are permanent and global, did you want a bookmark?) |
|
223 | (branches are permanent and global, did you want a bookmark?) | |
202 | $ echo some text >a |
|
224 | $ echo some text >a | |
203 | $ hg ci -m "starting branch stable" |
|
225 | $ hg ci -m "starting branch stable" | |
204 | $ hg tag ref2 |
|
226 | $ hg tag ref2 | |
205 | $ echo some more text >a |
|
227 | $ echo some more text >a | |
206 | $ hg ci -m "another change for branch stable" |
|
228 | $ hg ci -m "another change for branch stable" | |
207 | $ hg up ref2 |
|
229 | $ hg up ref2 | |
208 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
230 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
209 | $ hg parents |
|
231 | $ hg parents | |
210 | changeset: 13:e8ece76546a6 |
|
232 | changeset: 13:e8ece76546a6 | |
211 | branch: stable |
|
233 | branch: stable | |
212 | tag: ref2 |
|
234 | tag: ref2 | |
213 | parent: 10:a7949464abda |
|
235 | parent: 10:a7949464abda | |
214 | user: test |
|
236 | user: test | |
215 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
237 | date: Thu Jan 01 00:00:00 1970 +0000 | |
216 | summary: starting branch stable |
|
238 | summary: starting branch stable | |
217 |
|
239 | |||
218 |
|
240 | |||
219 | Repo a has two heads: |
|
241 | Repo a has two heads: | |
220 |
|
242 | |||
221 | $ hg heads |
|
243 | $ hg heads | |
222 | changeset: 15:0aae7cf88f0d |
|
244 | changeset: 15:0aae7cf88f0d | |
223 | branch: stable |
|
245 | branch: stable | |
224 | tag: tip |
|
246 | tag: tip | |
225 | user: test |
|
247 | user: test | |
226 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
248 | date: Thu Jan 01 00:00:00 1970 +0000 | |
227 | summary: another change for branch stable |
|
249 | summary: another change for branch stable | |
228 |
|
250 | |||
229 | changeset: 12:f21241060d6a |
|
251 | changeset: 12:f21241060d6a | |
230 | user: test |
|
252 | user: test | |
231 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
253 | date: Thu Jan 01 00:00:00 1970 +0000 | |
232 | summary: hacked default |
|
254 | summary: hacked default | |
233 |
|
255 | |||
234 |
|
256 | |||
235 | $ cd .. |
|
257 | $ cd .. | |
236 |
|
258 | |||
237 |
|
259 | |||
238 | Testing --noupdate with --updaterev (must abort): |
|
260 | Testing --noupdate with --updaterev (must abort): | |
239 |
|
261 | |||
240 | $ hg clone --noupdate --updaterev 1 a ua |
|
262 | $ hg clone --noupdate --updaterev 1 a ua | |
241 | abort: cannot specify both --noupdate and --updaterev |
|
263 | abort: cannot specify both --noupdate and --updaterev | |
242 | [255] |
|
264 | [255] | |
243 |
|
265 | |||
244 |
|
266 | |||
245 | Testing clone -u: |
|
267 | Testing clone -u: | |
246 |
|
268 | |||
247 | $ hg clone -u . a ua |
|
269 | $ hg clone -u . a ua | |
248 | updating to branch stable |
|
270 | updating to branch stable | |
249 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
271 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
250 |
|
272 | |||
251 | Repo ua has both heads: |
|
273 | Repo ua has both heads: | |
252 |
|
274 | |||
253 | $ hg -R ua heads |
|
275 | $ hg -R ua heads | |
254 | changeset: 15:0aae7cf88f0d |
|
276 | changeset: 15:0aae7cf88f0d | |
255 | branch: stable |
|
277 | branch: stable | |
256 | tag: tip |
|
278 | tag: tip | |
257 | user: test |
|
279 | user: test | |
258 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
280 | date: Thu Jan 01 00:00:00 1970 +0000 | |
259 | summary: another change for branch stable |
|
281 | summary: another change for branch stable | |
260 |
|
282 | |||
261 | changeset: 12:f21241060d6a |
|
283 | changeset: 12:f21241060d6a | |
262 | user: test |
|
284 | user: test | |
263 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
285 | date: Thu Jan 01 00:00:00 1970 +0000 | |
264 | summary: hacked default |
|
286 | summary: hacked default | |
265 |
|
287 | |||
266 |
|
288 | |||
267 | Same revision checked out in repo a and ua: |
|
289 | Same revision checked out in repo a and ua: | |
268 |
|
290 | |||
269 | $ hg -R a parents --template "{node|short}\n" |
|
291 | $ hg -R a parents --template "{node|short}\n" | |
270 | e8ece76546a6 |
|
292 | e8ece76546a6 | |
271 | $ hg -R ua parents --template "{node|short}\n" |
|
293 | $ hg -R ua parents --template "{node|short}\n" | |
272 | e8ece76546a6 |
|
294 | e8ece76546a6 | |
273 |
|
295 | |||
274 | $ rm -r ua |
|
296 | $ rm -r ua | |
275 |
|
297 | |||
276 |
|
298 | |||
277 | Testing clone --pull -u: |
|
299 | Testing clone --pull -u: | |
278 |
|
300 | |||
279 | $ hg clone --pull -u . a ua |
|
301 | $ hg clone --pull -u . a ua | |
280 | requesting all changes |
|
302 | requesting all changes | |
281 | adding changesets |
|
303 | adding changesets | |
282 | adding manifests |
|
304 | adding manifests | |
283 | adding file changes |
|
305 | adding file changes | |
284 | added 16 changesets with 16 changes to 3 files (+1 heads) |
|
306 | added 16 changesets with 16 changes to 3 files (+1 heads) | |
285 | new changesets acb14030fe0a:0aae7cf88f0d |
|
307 | new changesets acb14030fe0a:0aae7cf88f0d | |
286 | updating to branch stable |
|
308 | updating to branch stable | |
287 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
309 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
288 |
|
310 | |||
289 | Repo ua has both heads: |
|
311 | Repo ua has both heads: | |
290 |
|
312 | |||
291 | $ hg -R ua heads |
|
313 | $ hg -R ua heads | |
292 | changeset: 15:0aae7cf88f0d |
|
314 | changeset: 15:0aae7cf88f0d | |
293 | branch: stable |
|
315 | branch: stable | |
294 | tag: tip |
|
316 | tag: tip | |
295 | user: test |
|
317 | user: test | |
296 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
318 | date: Thu Jan 01 00:00:00 1970 +0000 | |
297 | summary: another change for branch stable |
|
319 | summary: another change for branch stable | |
298 |
|
320 | |||
299 | changeset: 12:f21241060d6a |
|
321 | changeset: 12:f21241060d6a | |
300 | user: test |
|
322 | user: test | |
301 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
323 | date: Thu Jan 01 00:00:00 1970 +0000 | |
302 | summary: hacked default |
|
324 | summary: hacked default | |
303 |
|
325 | |||
304 |
|
326 | |||
305 | Same revision checked out in repo a and ua: |
|
327 | Same revision checked out in repo a and ua: | |
306 |
|
328 | |||
307 | $ hg -R a parents --template "{node|short}\n" |
|
329 | $ hg -R a parents --template "{node|short}\n" | |
308 | e8ece76546a6 |
|
330 | e8ece76546a6 | |
309 | $ hg -R ua parents --template "{node|short}\n" |
|
331 | $ hg -R ua parents --template "{node|short}\n" | |
310 | e8ece76546a6 |
|
332 | e8ece76546a6 | |
311 |
|
333 | |||
312 | $ rm -r ua |
|
334 | $ rm -r ua | |
313 |
|
335 | |||
314 |
|
336 | |||
315 | Testing clone -u <branch>: |
|
337 | Testing clone -u <branch>: | |
316 |
|
338 | |||
317 | $ hg clone -u stable a ua |
|
339 | $ hg clone -u stable a ua | |
318 | updating to branch stable |
|
340 | updating to branch stable | |
319 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
341 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
320 |
|
342 | |||
321 | Repo ua has both heads: |
|
343 | Repo ua has both heads: | |
322 |
|
344 | |||
323 | $ hg -R ua heads |
|
345 | $ hg -R ua heads | |
324 | changeset: 15:0aae7cf88f0d |
|
346 | changeset: 15:0aae7cf88f0d | |
325 | branch: stable |
|
347 | branch: stable | |
326 | tag: tip |
|
348 | tag: tip | |
327 | user: test |
|
349 | user: test | |
328 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
350 | date: Thu Jan 01 00:00:00 1970 +0000 | |
329 | summary: another change for branch stable |
|
351 | summary: another change for branch stable | |
330 |
|
352 | |||
331 | changeset: 12:f21241060d6a |
|
353 | changeset: 12:f21241060d6a | |
332 | user: test |
|
354 | user: test | |
333 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
355 | date: Thu Jan 01 00:00:00 1970 +0000 | |
334 | summary: hacked default |
|
356 | summary: hacked default | |
335 |
|
357 | |||
336 |
|
358 | |||
337 | Branch 'stable' is checked out: |
|
359 | Branch 'stable' is checked out: | |
338 |
|
360 | |||
339 | $ hg -R ua parents |
|
361 | $ hg -R ua parents | |
340 | changeset: 15:0aae7cf88f0d |
|
362 | changeset: 15:0aae7cf88f0d | |
341 | branch: stable |
|
363 | branch: stable | |
342 | tag: tip |
|
364 | tag: tip | |
343 | user: test |
|
365 | user: test | |
344 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
366 | date: Thu Jan 01 00:00:00 1970 +0000 | |
345 | summary: another change for branch stable |
|
367 | summary: another change for branch stable | |
346 |
|
368 | |||
347 |
|
369 | |||
348 | $ rm -r ua |
|
370 | $ rm -r ua | |
349 |
|
371 | |||
350 |
|
372 | |||
351 | Testing default checkout: |
|
373 | Testing default checkout: | |
352 |
|
374 | |||
353 | $ hg clone a ua |
|
375 | $ hg clone a ua | |
354 | updating to branch default |
|
376 | updating to branch default | |
355 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
377 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
356 |
|
378 | |||
357 | Repo ua has both heads: |
|
379 | Repo ua has both heads: | |
358 |
|
380 | |||
359 | $ hg -R ua heads |
|
381 | $ hg -R ua heads | |
360 | changeset: 15:0aae7cf88f0d |
|
382 | changeset: 15:0aae7cf88f0d | |
361 | branch: stable |
|
383 | branch: stable | |
362 | tag: tip |
|
384 | tag: tip | |
363 | user: test |
|
385 | user: test | |
364 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
386 | date: Thu Jan 01 00:00:00 1970 +0000 | |
365 | summary: another change for branch stable |
|
387 | summary: another change for branch stable | |
366 |
|
388 | |||
367 | changeset: 12:f21241060d6a |
|
389 | changeset: 12:f21241060d6a | |
368 | user: test |
|
390 | user: test | |
369 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
391 | date: Thu Jan 01 00:00:00 1970 +0000 | |
370 | summary: hacked default |
|
392 | summary: hacked default | |
371 |
|
393 | |||
372 |
|
394 | |||
373 | Branch 'default' is checked out: |
|
395 | Branch 'default' is checked out: | |
374 |
|
396 | |||
375 | $ hg -R ua parents |
|
397 | $ hg -R ua parents | |
376 | changeset: 12:f21241060d6a |
|
398 | changeset: 12:f21241060d6a | |
377 | user: test |
|
399 | user: test | |
378 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
400 | date: Thu Jan 01 00:00:00 1970 +0000 | |
379 | summary: hacked default |
|
401 | summary: hacked default | |
380 |
|
402 | |||
381 | Test clone with a branch named "@" (issue3677) |
|
403 | Test clone with a branch named "@" (issue3677) | |
382 |
|
404 | |||
383 | $ hg -R ua branch @ |
|
405 | $ hg -R ua branch @ | |
384 | marked working directory as branch @ |
|
406 | marked working directory as branch @ | |
385 | $ hg -R ua commit -m 'created branch @' |
|
407 | $ hg -R ua commit -m 'created branch @' | |
386 | $ hg clone ua atbranch |
|
408 | $ hg clone ua atbranch | |
387 | updating to branch default |
|
409 | updating to branch default | |
388 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
410 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
389 | $ hg -R atbranch heads |
|
411 | $ hg -R atbranch heads | |
390 | changeset: 16:798b6d97153e |
|
412 | changeset: 16:798b6d97153e | |
391 | branch: @ |
|
413 | branch: @ | |
392 | tag: tip |
|
414 | tag: tip | |
393 | parent: 12:f21241060d6a |
|
415 | parent: 12:f21241060d6a | |
394 | user: test |
|
416 | user: test | |
395 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
417 | date: Thu Jan 01 00:00:00 1970 +0000 | |
396 | summary: created branch @ |
|
418 | summary: created branch @ | |
397 |
|
419 | |||
398 | changeset: 15:0aae7cf88f0d |
|
420 | changeset: 15:0aae7cf88f0d | |
399 | branch: stable |
|
421 | branch: stable | |
400 | user: test |
|
422 | user: test | |
401 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
423 | date: Thu Jan 01 00:00:00 1970 +0000 | |
402 | summary: another change for branch stable |
|
424 | summary: another change for branch stable | |
403 |
|
425 | |||
404 | changeset: 12:f21241060d6a |
|
426 | changeset: 12:f21241060d6a | |
405 | user: test |
|
427 | user: test | |
406 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
428 | date: Thu Jan 01 00:00:00 1970 +0000 | |
407 | summary: hacked default |
|
429 | summary: hacked default | |
408 |
|
430 | |||
409 | $ hg -R atbranch parents |
|
431 | $ hg -R atbranch parents | |
410 | changeset: 12:f21241060d6a |
|
432 | changeset: 12:f21241060d6a | |
411 | user: test |
|
433 | user: test | |
412 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
434 | date: Thu Jan 01 00:00:00 1970 +0000 | |
413 | summary: hacked default |
|
435 | summary: hacked default | |
414 |
|
436 | |||
415 |
|
437 | |||
416 | $ rm -r ua atbranch |
|
438 | $ rm -r ua atbranch | |
417 |
|
439 | |||
418 |
|
440 | |||
419 | Testing #<branch>: |
|
441 | Testing #<branch>: | |
420 |
|
442 | |||
421 | $ hg clone -u . a#stable ua |
|
443 | $ hg clone -u . a#stable ua | |
422 | adding changesets |
|
444 | adding changesets | |
423 | adding manifests |
|
445 | adding manifests | |
424 | adding file changes |
|
446 | adding file changes | |
425 | added 14 changesets with 14 changes to 3 files |
|
447 | added 14 changesets with 14 changes to 3 files | |
426 | new changesets acb14030fe0a:0aae7cf88f0d |
|
448 | new changesets acb14030fe0a:0aae7cf88f0d | |
427 | updating to branch stable |
|
449 | updating to branch stable | |
428 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
450 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
429 |
|
451 | |||
430 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): |
|
452 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): | |
431 |
|
453 | |||
432 | $ hg -R ua heads |
|
454 | $ hg -R ua heads | |
433 | changeset: 13:0aae7cf88f0d |
|
455 | changeset: 13:0aae7cf88f0d | |
434 | branch: stable |
|
456 | branch: stable | |
435 | tag: tip |
|
457 | tag: tip | |
436 | user: test |
|
458 | user: test | |
437 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
459 | date: Thu Jan 01 00:00:00 1970 +0000 | |
438 | summary: another change for branch stable |
|
460 | summary: another change for branch stable | |
439 |
|
461 | |||
440 | changeset: 10:a7949464abda |
|
462 | changeset: 10:a7949464abda | |
441 | user: test |
|
463 | user: test | |
442 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
464 | date: Thu Jan 01 00:00:00 1970 +0000 | |
443 | summary: test |
|
465 | summary: test | |
444 |
|
466 | |||
445 |
|
467 | |||
446 | Same revision checked out in repo a and ua: |
|
468 | Same revision checked out in repo a and ua: | |
447 |
|
469 | |||
448 | $ hg -R a parents --template "{node|short}\n" |
|
470 | $ hg -R a parents --template "{node|short}\n" | |
449 | e8ece76546a6 |
|
471 | e8ece76546a6 | |
450 | $ hg -R ua parents --template "{node|short}\n" |
|
472 | $ hg -R ua parents --template "{node|short}\n" | |
451 | e8ece76546a6 |
|
473 | e8ece76546a6 | |
452 |
|
474 | |||
453 | $ rm -r ua |
|
475 | $ rm -r ua | |
454 |
|
476 | |||
455 |
|
477 | |||
456 | Testing -u -r <branch>: |
|
478 | Testing -u -r <branch>: | |
457 |
|
479 | |||
458 | $ hg clone -u . -r stable a ua |
|
480 | $ hg clone -u . -r stable a ua | |
459 | adding changesets |
|
481 | adding changesets | |
460 | adding manifests |
|
482 | adding manifests | |
461 | adding file changes |
|
483 | adding file changes | |
462 | added 14 changesets with 14 changes to 3 files |
|
484 | added 14 changesets with 14 changes to 3 files | |
463 | new changesets acb14030fe0a:0aae7cf88f0d |
|
485 | new changesets acb14030fe0a:0aae7cf88f0d | |
464 | updating to branch stable |
|
486 | updating to branch stable | |
465 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
487 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
466 |
|
488 | |||
467 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): |
|
489 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): | |
468 |
|
490 | |||
469 | $ hg -R ua heads |
|
491 | $ hg -R ua heads | |
470 | changeset: 13:0aae7cf88f0d |
|
492 | changeset: 13:0aae7cf88f0d | |
471 | branch: stable |
|
493 | branch: stable | |
472 | tag: tip |
|
494 | tag: tip | |
473 | user: test |
|
495 | user: test | |
474 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
496 | date: Thu Jan 01 00:00:00 1970 +0000 | |
475 | summary: another change for branch stable |
|
497 | summary: another change for branch stable | |
476 |
|
498 | |||
477 | changeset: 10:a7949464abda |
|
499 | changeset: 10:a7949464abda | |
478 | user: test |
|
500 | user: test | |
479 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
501 | date: Thu Jan 01 00:00:00 1970 +0000 | |
480 | summary: test |
|
502 | summary: test | |
481 |
|
503 | |||
482 |
|
504 | |||
483 | Same revision checked out in repo a and ua: |
|
505 | Same revision checked out in repo a and ua: | |
484 |
|
506 | |||
485 | $ hg -R a parents --template "{node|short}\n" |
|
507 | $ hg -R a parents --template "{node|short}\n" | |
486 | e8ece76546a6 |
|
508 | e8ece76546a6 | |
487 | $ hg -R ua parents --template "{node|short}\n" |
|
509 | $ hg -R ua parents --template "{node|short}\n" | |
488 | e8ece76546a6 |
|
510 | e8ece76546a6 | |
489 |
|
511 | |||
490 | $ rm -r ua |
|
512 | $ rm -r ua | |
491 |
|
513 | |||
492 |
|
514 | |||
493 | Testing -r <branch>: |
|
515 | Testing -r <branch>: | |
494 |
|
516 | |||
495 | $ hg clone -r stable a ua |
|
517 | $ hg clone -r stable a ua | |
496 | adding changesets |
|
518 | adding changesets | |
497 | adding manifests |
|
519 | adding manifests | |
498 | adding file changes |
|
520 | adding file changes | |
499 | added 14 changesets with 14 changes to 3 files |
|
521 | added 14 changesets with 14 changes to 3 files | |
500 | new changesets acb14030fe0a:0aae7cf88f0d |
|
522 | new changesets acb14030fe0a:0aae7cf88f0d | |
501 | updating to branch stable |
|
523 | updating to branch stable | |
502 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
524 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
503 |
|
525 | |||
504 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): |
|
526 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): | |
505 |
|
527 | |||
506 | $ hg -R ua heads |
|
528 | $ hg -R ua heads | |
507 | changeset: 13:0aae7cf88f0d |
|
529 | changeset: 13:0aae7cf88f0d | |
508 | branch: stable |
|
530 | branch: stable | |
509 | tag: tip |
|
531 | tag: tip | |
510 | user: test |
|
532 | user: test | |
511 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
533 | date: Thu Jan 01 00:00:00 1970 +0000 | |
512 | summary: another change for branch stable |
|
534 | summary: another change for branch stable | |
513 |
|
535 | |||
514 | changeset: 10:a7949464abda |
|
536 | changeset: 10:a7949464abda | |
515 | user: test |
|
537 | user: test | |
516 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
538 | date: Thu Jan 01 00:00:00 1970 +0000 | |
517 | summary: test |
|
539 | summary: test | |
518 |
|
540 | |||
519 |
|
541 | |||
520 | Branch 'stable' is checked out: |
|
542 | Branch 'stable' is checked out: | |
521 |
|
543 | |||
522 | $ hg -R ua parents |
|
544 | $ hg -R ua parents | |
523 | changeset: 13:0aae7cf88f0d |
|
545 | changeset: 13:0aae7cf88f0d | |
524 | branch: stable |
|
546 | branch: stable | |
525 | tag: tip |
|
547 | tag: tip | |
526 | user: test |
|
548 | user: test | |
527 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
549 | date: Thu Jan 01 00:00:00 1970 +0000 | |
528 | summary: another change for branch stable |
|
550 | summary: another change for branch stable | |
529 |
|
551 | |||
530 |
|
552 | |||
531 | $ rm -r ua |
|
553 | $ rm -r ua | |
532 |
|
554 | |||
533 |
|
555 | |||
534 | Issue2267: Error in 1.6 hg.py: TypeError: 'NoneType' object is not |
|
556 | Issue2267: Error in 1.6 hg.py: TypeError: 'NoneType' object is not | |
535 | iterable in addbranchrevs() |
|
557 | iterable in addbranchrevs() | |
536 |
|
558 | |||
537 | $ cat <<EOF > simpleclone.py |
|
559 | $ cat <<EOF > simpleclone.py | |
538 | > from mercurial import ui, hg |
|
560 | > from mercurial import ui, hg | |
539 | > myui = ui.ui.load() |
|
561 | > myui = ui.ui.load() | |
540 | > repo = hg.repository(myui, 'a') |
|
562 | > repo = hg.repository(myui, 'a') | |
541 | > hg.clone(myui, {}, repo, dest="ua") |
|
563 | > hg.clone(myui, {}, repo, dest="ua") | |
542 | > EOF |
|
564 | > EOF | |
543 |
|
565 | |||
544 | $ $PYTHON simpleclone.py |
|
566 | $ $PYTHON simpleclone.py | |
545 | updating to branch default |
|
567 | updating to branch default | |
546 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
568 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
547 |
|
569 | |||
548 | $ rm -r ua |
|
570 | $ rm -r ua | |
549 |
|
571 | |||
550 | $ cat <<EOF > branchclone.py |
|
572 | $ cat <<EOF > branchclone.py | |
551 | > from mercurial import ui, hg, extensions |
|
573 | > from mercurial import ui, hg, extensions | |
552 | > myui = ui.ui.load() |
|
574 | > myui = ui.ui.load() | |
553 | > extensions.loadall(myui) |
|
575 | > extensions.loadall(myui) | |
554 | > repo = hg.repository(myui, 'a') |
|
576 | > repo = hg.repository(myui, 'a') | |
555 | > hg.clone(myui, {}, repo, dest="ua", branch=["stable",]) |
|
577 | > hg.clone(myui, {}, repo, dest="ua", branch=["stable",]) | |
556 | > EOF |
|
578 | > EOF | |
557 |
|
579 | |||
558 | $ $PYTHON branchclone.py |
|
580 | $ $PYTHON branchclone.py | |
559 | adding changesets |
|
581 | adding changesets | |
560 | adding manifests |
|
582 | adding manifests | |
561 | adding file changes |
|
583 | adding file changes | |
562 | added 14 changesets with 14 changes to 3 files |
|
584 | added 14 changesets with 14 changes to 3 files | |
563 | new changesets acb14030fe0a:0aae7cf88f0d |
|
585 | new changesets acb14030fe0a:0aae7cf88f0d | |
564 | updating to branch stable |
|
586 | updating to branch stable | |
565 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
587 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
566 | $ rm -r ua |
|
588 | $ rm -r ua | |
567 |
|
589 | |||
568 |
|
590 | |||
569 | Test clone with special '@' bookmark: |
|
591 | Test clone with special '@' bookmark: | |
570 | $ cd a |
|
592 | $ cd a | |
571 | $ hg bookmark -r a7949464abda @ # branch point of stable from default |
|
593 | $ hg bookmark -r a7949464abda @ # branch point of stable from default | |
572 | $ hg clone . ../i |
|
594 | $ hg clone . ../i | |
573 | updating to bookmark @ |
|
595 | updating to bookmark @ | |
574 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
596 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
575 | $ hg id -i ../i |
|
597 | $ hg id -i ../i | |
576 | a7949464abda |
|
598 | a7949464abda | |
577 | $ rm -r ../i |
|
599 | $ rm -r ../i | |
578 |
|
600 | |||
579 | $ hg bookmark -f -r stable @ |
|
601 | $ hg bookmark -f -r stable @ | |
580 | $ hg bookmarks |
|
602 | $ hg bookmarks | |
581 | @ 15:0aae7cf88f0d |
|
603 | @ 15:0aae7cf88f0d | |
582 | $ hg clone . ../i |
|
604 | $ hg clone . ../i | |
583 | updating to bookmark @ on branch stable |
|
605 | updating to bookmark @ on branch stable | |
584 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
606 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
585 | $ hg id -i ../i |
|
607 | $ hg id -i ../i | |
586 | 0aae7cf88f0d |
|
608 | 0aae7cf88f0d | |
587 | $ cd "$TESTTMP" |
|
609 | $ cd "$TESTTMP" | |
588 |
|
610 | |||
589 |
|
611 | |||
590 | Testing failures: |
|
612 | Testing failures: | |
591 |
|
613 | |||
592 | $ mkdir fail |
|
614 | $ mkdir fail | |
593 | $ cd fail |
|
615 | $ cd fail | |
594 |
|
616 | |||
595 | No local source |
|
617 | No local source | |
596 |
|
618 | |||
597 | $ hg clone a b |
|
619 | $ hg clone a b | |
598 | abort: repository a not found! |
|
620 | abort: repository a not found! | |
599 | [255] |
|
621 | [255] | |
600 |
|
622 | |||
601 | No remote source |
|
623 | No remote source | |
602 |
|
624 | |||
603 | #if windows |
|
625 | #if windows | |
604 | $ hg clone http://$LOCALIP:3121/a b |
|
626 | $ hg clone http://$LOCALIP:3121/a b | |
605 | abort: error: * (glob) |
|
627 | abort: error: * (glob) | |
606 | [255] |
|
628 | [255] | |
607 | #else |
|
629 | #else | |
608 | $ hg clone http://$LOCALIP:3121/a b |
|
630 | $ hg clone http://$LOCALIP:3121/a b | |
609 | abort: error: *refused* (glob) |
|
631 | abort: error: *refused* (glob) | |
610 | [255] |
|
632 | [255] | |
611 | #endif |
|
633 | #endif | |
612 | $ rm -rf b # work around bug with http clone |
|
634 | $ rm -rf b # work around bug with http clone | |
613 |
|
635 | |||
614 |
|
636 | |||
615 | #if unix-permissions no-root |
|
637 | #if unix-permissions no-root | |
616 |
|
638 | |||
617 | Inaccessible source |
|
639 | Inaccessible source | |
618 |
|
640 | |||
619 | $ mkdir a |
|
641 | $ mkdir a | |
620 | $ chmod 000 a |
|
642 | $ chmod 000 a | |
621 | $ hg clone a b |
|
643 | $ hg clone a b | |
622 | abort: repository a not found! |
|
644 | abort: repository a not found! | |
623 | [255] |
|
645 | [255] | |
624 |
|
646 | |||
625 | Inaccessible destination |
|
647 | Inaccessible destination | |
626 |
|
648 | |||
627 | $ hg init b |
|
649 | $ hg init b | |
628 | $ cd b |
|
650 | $ cd b | |
629 | $ hg clone . ../a |
|
651 | $ hg clone . ../a | |
630 | abort: Permission denied: '../a' |
|
652 | abort: Permission denied: '../a' | |
631 | [255] |
|
653 | [255] | |
632 | $ cd .. |
|
654 | $ cd .. | |
633 | $ chmod 700 a |
|
655 | $ chmod 700 a | |
634 | $ rm -r a b |
|
656 | $ rm -r a b | |
635 |
|
657 | |||
636 | #endif |
|
658 | #endif | |
637 |
|
659 | |||
638 |
|
660 | |||
639 | #if fifo |
|
661 | #if fifo | |
640 |
|
662 | |||
641 | Source of wrong type |
|
663 | Source of wrong type | |
642 |
|
664 | |||
643 | $ mkfifo a |
|
665 | $ mkfifo a | |
644 | $ hg clone a b |
|
666 | $ hg clone a b | |
645 | abort: repository a not found! |
|
667 | abort: repository a not found! | |
646 | [255] |
|
668 | [255] | |
647 | $ rm a |
|
669 | $ rm a | |
648 |
|
670 | |||
649 | #endif |
|
671 | #endif | |
650 |
|
672 | |||
651 | Default destination, same directory |
|
673 | Default destination, same directory | |
652 |
|
674 | |||
653 | $ hg init q |
|
675 | $ hg init q | |
654 | $ hg clone q |
|
676 | $ hg clone q | |
655 | destination directory: q |
|
677 | destination directory: q | |
656 | abort: destination 'q' is not empty |
|
678 | abort: destination 'q' is not empty | |
657 | [255] |
|
679 | [255] | |
658 |
|
680 | |||
659 | destination directory not empty |
|
681 | destination directory not empty | |
660 |
|
682 | |||
661 | $ mkdir a |
|
683 | $ mkdir a | |
662 | $ echo stuff > a/a |
|
684 | $ echo stuff > a/a | |
663 | $ hg clone q a |
|
685 | $ hg clone q a | |
664 | abort: destination 'a' is not empty |
|
686 | abort: destination 'a' is not empty | |
665 | [255] |
|
687 | [255] | |
666 |
|
688 | |||
667 |
|
689 | |||
668 | #if unix-permissions no-root |
|
690 | #if unix-permissions no-root | |
669 |
|
691 | |||
670 | leave existing directory in place after clone failure |
|
692 | leave existing directory in place after clone failure | |
671 |
|
693 | |||
672 | $ hg init c |
|
694 | $ hg init c | |
673 | $ cd c |
|
695 | $ cd c | |
674 | $ echo c > c |
|
696 | $ echo c > c | |
675 | $ hg commit -A -m test |
|
697 | $ hg commit -A -m test | |
676 | adding c |
|
698 | adding c | |
677 | $ chmod -rx .hg/store/data |
|
699 | $ chmod -rx .hg/store/data | |
678 | $ cd .. |
|
700 | $ cd .. | |
679 | $ mkdir d |
|
701 | $ mkdir d | |
680 | $ hg clone c d 2> err |
|
702 | $ hg clone c d 2> err | |
681 | [255] |
|
703 | [255] | |
682 | $ test -d d |
|
704 | $ test -d d | |
683 | $ test -d d/.hg |
|
705 | $ test -d d/.hg | |
684 | [1] |
|
706 | [1] | |
685 |
|
707 | |||
686 | re-enable perm to allow deletion |
|
708 | re-enable perm to allow deletion | |
687 |
|
709 | |||
688 | $ chmod +rx c/.hg/store/data |
|
710 | $ chmod +rx c/.hg/store/data | |
689 |
|
711 | |||
690 | #endif |
|
712 | #endif | |
691 |
|
713 | |||
692 | $ cd .. |
|
714 | $ cd .. | |
693 |
|
715 | |||
694 | Test clone from the repository in (emulated) revlog format 0 (issue4203): |
|
716 | Test clone from the repository in (emulated) revlog format 0 (issue4203): | |
695 |
|
717 | |||
696 | $ mkdir issue4203 |
|
718 | $ mkdir issue4203 | |
697 | $ mkdir -p src/.hg |
|
719 | $ mkdir -p src/.hg | |
698 | $ echo foo > src/foo |
|
720 | $ echo foo > src/foo | |
699 | $ hg -R src add src/foo |
|
721 | $ hg -R src add src/foo | |
700 | $ hg -R src commit -m '#0' |
|
722 | $ hg -R src commit -m '#0' | |
701 | $ hg -R src log -q |
|
723 | $ hg -R src log -q | |
702 | 0:e1bab28bca43 |
|
724 | 0:e1bab28bca43 | |
703 | $ hg clone -U -q src dst |
|
725 | $ hg clone -U -q src dst | |
704 | $ hg -R dst log -q |
|
726 | $ hg -R dst log -q | |
705 | 0:e1bab28bca43 |
|
727 | 0:e1bab28bca43 | |
706 |
|
728 | |||
707 | Create repositories to test auto sharing functionality |
|
729 | Create repositories to test auto sharing functionality | |
708 |
|
730 | |||
709 | $ cat >> $HGRCPATH << EOF |
|
731 | $ cat >> $HGRCPATH << EOF | |
710 | > [extensions] |
|
732 | > [extensions] | |
711 | > share= |
|
733 | > share= | |
712 | > EOF |
|
734 | > EOF | |
713 |
|
735 | |||
714 | $ hg init empty |
|
736 | $ hg init empty | |
715 | $ hg init source1a |
|
737 | $ hg init source1a | |
716 | $ cd source1a |
|
738 | $ cd source1a | |
717 | $ echo initial1 > foo |
|
739 | $ echo initial1 > foo | |
718 | $ hg -q commit -A -m initial |
|
740 | $ hg -q commit -A -m initial | |
719 | $ echo second > foo |
|
741 | $ echo second > foo | |
720 | $ hg commit -m second |
|
742 | $ hg commit -m second | |
721 | $ cd .. |
|
743 | $ cd .. | |
722 |
|
744 | |||
723 | $ hg init filteredrev0 |
|
745 | $ hg init filteredrev0 | |
724 | $ cd filteredrev0 |
|
746 | $ cd filteredrev0 | |
725 | $ cat >> .hg/hgrc << EOF |
|
747 | $ cat >> .hg/hgrc << EOF | |
726 | > [experimental] |
|
748 | > [experimental] | |
727 | > evolution.createmarkers=True |
|
749 | > evolution.createmarkers=True | |
728 | > EOF |
|
750 | > EOF | |
729 | $ echo initial1 > foo |
|
751 | $ echo initial1 > foo | |
730 | $ hg -q commit -A -m initial0 |
|
752 | $ hg -q commit -A -m initial0 | |
731 | $ hg -q up -r null |
|
753 | $ hg -q up -r null | |
732 | $ echo initial2 > foo |
|
754 | $ echo initial2 > foo | |
733 | $ hg -q commit -A -m initial1 |
|
755 | $ hg -q commit -A -m initial1 | |
734 | $ hg debugobsolete c05d5c47a5cf81401869999f3d05f7d699d2b29a e082c1832e09a7d1e78b7fd49a592d372de854c8 |
|
756 | $ hg debugobsolete c05d5c47a5cf81401869999f3d05f7d699d2b29a e082c1832e09a7d1e78b7fd49a592d372de854c8 | |
735 | obsoleted 1 changesets |
|
757 | obsoleted 1 changesets | |
736 | $ cd .. |
|
758 | $ cd .. | |
737 |
|
759 | |||
738 | $ hg -q clone --pull source1a source1b |
|
760 | $ hg -q clone --pull source1a source1b | |
739 | $ cd source1a |
|
761 | $ cd source1a | |
740 | $ hg bookmark bookA |
|
762 | $ hg bookmark bookA | |
741 | $ echo 1a > foo |
|
763 | $ echo 1a > foo | |
742 | $ hg commit -m 1a |
|
764 | $ hg commit -m 1a | |
743 | $ cd ../source1b |
|
765 | $ cd ../source1b | |
744 | $ hg -q up -r 0 |
|
766 | $ hg -q up -r 0 | |
745 | $ echo head1 > foo |
|
767 | $ echo head1 > foo | |
746 | $ hg commit -m head1 |
|
768 | $ hg commit -m head1 | |
747 | created new head |
|
769 | created new head | |
748 | $ hg bookmark head1 |
|
770 | $ hg bookmark head1 | |
749 | $ hg -q up -r 0 |
|
771 | $ hg -q up -r 0 | |
750 | $ echo head2 > foo |
|
772 | $ echo head2 > foo | |
751 | $ hg commit -m head2 |
|
773 | $ hg commit -m head2 | |
752 | created new head |
|
774 | created new head | |
753 | $ hg bookmark head2 |
|
775 | $ hg bookmark head2 | |
754 | $ hg -q up -r 0 |
|
776 | $ hg -q up -r 0 | |
755 | $ hg branch branch1 |
|
777 | $ hg branch branch1 | |
756 | marked working directory as branch branch1 |
|
778 | marked working directory as branch branch1 | |
757 | (branches are permanent and global, did you want a bookmark?) |
|
779 | (branches are permanent and global, did you want a bookmark?) | |
758 | $ echo branch1 > foo |
|
780 | $ echo branch1 > foo | |
759 | $ hg commit -m branch1 |
|
781 | $ hg commit -m branch1 | |
760 | $ hg -q up -r 0 |
|
782 | $ hg -q up -r 0 | |
761 | $ hg branch branch2 |
|
783 | $ hg branch branch2 | |
762 | marked working directory as branch branch2 |
|
784 | marked working directory as branch branch2 | |
763 | $ echo branch2 > foo |
|
785 | $ echo branch2 > foo | |
764 | $ hg commit -m branch2 |
|
786 | $ hg commit -m branch2 | |
765 | $ cd .. |
|
787 | $ cd .. | |
766 | $ hg init source2 |
|
788 | $ hg init source2 | |
767 | $ cd source2 |
|
789 | $ cd source2 | |
768 | $ echo initial2 > foo |
|
790 | $ echo initial2 > foo | |
769 | $ hg -q commit -A -m initial2 |
|
791 | $ hg -q commit -A -m initial2 | |
770 | $ echo second > foo |
|
792 | $ echo second > foo | |
771 | $ hg commit -m second |
|
793 | $ hg commit -m second | |
772 | $ cd .. |
|
794 | $ cd .. | |
773 |
|
795 | |||
774 | Clone with auto share from an empty repo should not result in share |
|
796 | Clone with auto share from an empty repo should not result in share | |
775 |
|
797 | |||
776 | $ mkdir share |
|
798 | $ mkdir share | |
777 | $ hg --config share.pool=share clone empty share-empty |
|
799 | $ hg --config share.pool=share clone empty share-empty | |
778 | (not using pooled storage: remote appears to be empty) |
|
800 | (not using pooled storage: remote appears to be empty) | |
779 | updating to branch default |
|
801 | updating to branch default | |
780 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
802 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
781 | $ ls share |
|
803 | $ ls share | |
782 | $ test -d share-empty/.hg/store |
|
804 | $ test -d share-empty/.hg/store | |
783 | $ test -f share-empty/.hg/sharedpath |
|
805 | $ test -f share-empty/.hg/sharedpath | |
784 | [1] |
|
806 | [1] | |
785 |
|
807 | |||
786 | Clone with auto share from a repo with filtered revision 0 should not result in share |
|
808 | Clone with auto share from a repo with filtered revision 0 should not result in share | |
787 |
|
809 | |||
788 | $ hg --config share.pool=share clone filteredrev0 share-filtered |
|
810 | $ hg --config share.pool=share clone filteredrev0 share-filtered | |
789 | (not using pooled storage: unable to resolve identity of remote) |
|
811 | (not using pooled storage: unable to resolve identity of remote) | |
790 | requesting all changes |
|
812 | requesting all changes | |
791 | adding changesets |
|
813 | adding changesets | |
792 | adding manifests |
|
814 | adding manifests | |
793 | adding file changes |
|
815 | adding file changes | |
794 | added 1 changesets with 1 changes to 1 files |
|
816 | added 1 changesets with 1 changes to 1 files | |
795 | new changesets e082c1832e09 |
|
817 | new changesets e082c1832e09 | |
796 | updating to branch default |
|
818 | updating to branch default | |
797 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
819 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
798 |
|
820 | |||
799 | Clone from repo with content should result in shared store being created |
|
821 | Clone from repo with content should result in shared store being created | |
800 |
|
822 | |||
801 | $ hg --config share.pool=share clone source1a share-dest1a |
|
823 | $ hg --config share.pool=share clone source1a share-dest1a | |
802 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
824 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
803 | requesting all changes |
|
825 | requesting all changes | |
804 | adding changesets |
|
826 | adding changesets | |
805 | adding manifests |
|
827 | adding manifests | |
806 | adding file changes |
|
828 | adding file changes | |
807 | added 3 changesets with 3 changes to 1 files |
|
829 | added 3 changesets with 3 changes to 1 files | |
808 | new changesets b5f04eac9d8f:e5bfe23c0b47 |
|
830 | new changesets b5f04eac9d8f:e5bfe23c0b47 | |
809 | searching for changes |
|
831 | searching for changes | |
810 | no changes found |
|
832 | no changes found | |
811 | adding remote bookmark bookA |
|
833 | adding remote bookmark bookA | |
812 | updating working directory |
|
834 | updating working directory | |
813 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
835 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
814 |
|
836 | |||
815 | The shared repo should have been created |
|
837 | The shared repo should have been created | |
816 |
|
838 | |||
817 | $ ls share |
|
839 | $ ls share | |
818 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 |
|
840 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 | |
819 |
|
841 | |||
820 | The destination should point to it |
|
842 | The destination should point to it | |
821 |
|
843 | |||
822 | $ cat share-dest1a/.hg/sharedpath; echo |
|
844 | $ cat share-dest1a/.hg/sharedpath; echo | |
823 | $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg |
|
845 | $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg | |
824 |
|
846 | |||
825 | The destination should have bookmarks |
|
847 | The destination should have bookmarks | |
826 |
|
848 | |||
827 | $ hg -R share-dest1a bookmarks |
|
849 | $ hg -R share-dest1a bookmarks | |
828 | bookA 2:e5bfe23c0b47 |
|
850 | bookA 2:e5bfe23c0b47 | |
829 |
|
851 | |||
830 | The default path should be the remote, not the share |
|
852 | The default path should be the remote, not the share | |
831 |
|
853 | |||
832 | $ hg -R share-dest1a config paths.default |
|
854 | $ hg -R share-dest1a config paths.default | |
833 | $TESTTMP/source1a |
|
855 | $TESTTMP/source1a | |
834 |
|
856 | |||
835 | Clone with existing share dir should result in pull + share |
|
857 | Clone with existing share dir should result in pull + share | |
836 |
|
858 | |||
837 | $ hg --config share.pool=share clone source1b share-dest1b |
|
859 | $ hg --config share.pool=share clone source1b share-dest1b | |
838 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
860 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
839 | searching for changes |
|
861 | searching for changes | |
840 | adding changesets |
|
862 | adding changesets | |
841 | adding manifests |
|
863 | adding manifests | |
842 | adding file changes |
|
864 | adding file changes | |
843 | added 4 changesets with 4 changes to 1 files (+4 heads) |
|
865 | added 4 changesets with 4 changes to 1 files (+4 heads) | |
844 | adding remote bookmark head1 |
|
866 | adding remote bookmark head1 | |
845 | adding remote bookmark head2 |
|
867 | adding remote bookmark head2 | |
846 | new changesets 4a8dc1ab4c13:6bacf4683960 |
|
868 | new changesets 4a8dc1ab4c13:6bacf4683960 | |
847 | updating working directory |
|
869 | updating working directory | |
848 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
870 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
849 |
|
871 | |||
850 | $ ls share |
|
872 | $ ls share | |
851 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 |
|
873 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 | |
852 |
|
874 | |||
853 | $ cat share-dest1b/.hg/sharedpath; echo |
|
875 | $ cat share-dest1b/.hg/sharedpath; echo | |
854 | $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg |
|
876 | $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg | |
855 |
|
877 | |||
856 | We only get bookmarks from the remote, not everything in the share |
|
878 | We only get bookmarks from the remote, not everything in the share | |
857 |
|
879 | |||
858 | $ hg -R share-dest1b bookmarks |
|
880 | $ hg -R share-dest1b bookmarks | |
859 | head1 3:4a8dc1ab4c13 |
|
881 | head1 3:4a8dc1ab4c13 | |
860 | head2 4:99f71071f117 |
|
882 | head2 4:99f71071f117 | |
861 |
|
883 | |||
862 | Default path should be source, not share. |
|
884 | Default path should be source, not share. | |
863 |
|
885 | |||
864 | $ hg -R share-dest1b config paths.default |
|
886 | $ hg -R share-dest1b config paths.default | |
865 | $TESTTMP/source1b |
|
887 | $TESTTMP/source1b | |
866 |
|
888 | |||
867 | Checked out revision should be head of default branch |
|
889 | Checked out revision should be head of default branch | |
868 |
|
890 | |||
869 | $ hg -R share-dest1b log -r . |
|
891 | $ hg -R share-dest1b log -r . | |
870 | changeset: 4:99f71071f117 |
|
892 | changeset: 4:99f71071f117 | |
871 | bookmark: head2 |
|
893 | bookmark: head2 | |
872 | parent: 0:b5f04eac9d8f |
|
894 | parent: 0:b5f04eac9d8f | |
873 | user: test |
|
895 | user: test | |
874 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
896 | date: Thu Jan 01 00:00:00 1970 +0000 | |
875 | summary: head2 |
|
897 | summary: head2 | |
876 |
|
898 | |||
877 |
|
899 | |||
878 | Clone from unrelated repo should result in new share |
|
900 | Clone from unrelated repo should result in new share | |
879 |
|
901 | |||
880 | $ hg --config share.pool=share clone source2 share-dest2 |
|
902 | $ hg --config share.pool=share clone source2 share-dest2 | |
881 | (sharing from new pooled repository 22aeff664783fd44c6d9b435618173c118c3448e) |
|
903 | (sharing from new pooled repository 22aeff664783fd44c6d9b435618173c118c3448e) | |
882 | requesting all changes |
|
904 | requesting all changes | |
883 | adding changesets |
|
905 | adding changesets | |
884 | adding manifests |
|
906 | adding manifests | |
885 | adding file changes |
|
907 | adding file changes | |
886 | added 2 changesets with 2 changes to 1 files |
|
908 | added 2 changesets with 2 changes to 1 files | |
887 | new changesets 22aeff664783:63cf6c3dba4a |
|
909 | new changesets 22aeff664783:63cf6c3dba4a | |
888 | searching for changes |
|
910 | searching for changes | |
889 | no changes found |
|
911 | no changes found | |
890 | updating working directory |
|
912 | updating working directory | |
891 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
913 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
892 |
|
914 | |||
893 | $ ls share |
|
915 | $ ls share | |
894 | 22aeff664783fd44c6d9b435618173c118c3448e |
|
916 | 22aeff664783fd44c6d9b435618173c118c3448e | |
895 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 |
|
917 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 | |
896 |
|
918 | |||
897 | remote naming mode works as advertised |
|
919 | remote naming mode works as advertised | |
898 |
|
920 | |||
899 | $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1a share-remote1a |
|
921 | $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1a share-remote1a | |
900 | (sharing from new pooled repository 195bb1fcdb595c14a6c13e0269129ed78f6debde) |
|
922 | (sharing from new pooled repository 195bb1fcdb595c14a6c13e0269129ed78f6debde) | |
901 | requesting all changes |
|
923 | requesting all changes | |
902 | adding changesets |
|
924 | adding changesets | |
903 | adding manifests |
|
925 | adding manifests | |
904 | adding file changes |
|
926 | adding file changes | |
905 | added 3 changesets with 3 changes to 1 files |
|
927 | added 3 changesets with 3 changes to 1 files | |
906 | new changesets b5f04eac9d8f:e5bfe23c0b47 |
|
928 | new changesets b5f04eac9d8f:e5bfe23c0b47 | |
907 | searching for changes |
|
929 | searching for changes | |
908 | no changes found |
|
930 | no changes found | |
909 | adding remote bookmark bookA |
|
931 | adding remote bookmark bookA | |
910 | updating working directory |
|
932 | updating working directory | |
911 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
933 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
912 |
|
934 | |||
913 | $ ls shareremote |
|
935 | $ ls shareremote | |
914 | 195bb1fcdb595c14a6c13e0269129ed78f6debde |
|
936 | 195bb1fcdb595c14a6c13e0269129ed78f6debde | |
915 |
|
937 | |||
916 | $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1b share-remote1b |
|
938 | $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1b share-remote1b | |
917 | (sharing from new pooled repository c0d4f83847ca2a873741feb7048a45085fd47c46) |
|
939 | (sharing from new pooled repository c0d4f83847ca2a873741feb7048a45085fd47c46) | |
918 | requesting all changes |
|
940 | requesting all changes | |
919 | adding changesets |
|
941 | adding changesets | |
920 | adding manifests |
|
942 | adding manifests | |
921 | adding file changes |
|
943 | adding file changes | |
922 | added 6 changesets with 6 changes to 1 files (+4 heads) |
|
944 | added 6 changesets with 6 changes to 1 files (+4 heads) | |
923 | new changesets b5f04eac9d8f:6bacf4683960 |
|
945 | new changesets b5f04eac9d8f:6bacf4683960 | |
924 | searching for changes |
|
946 | searching for changes | |
925 | no changes found |
|
947 | no changes found | |
926 | adding remote bookmark head1 |
|
948 | adding remote bookmark head1 | |
927 | adding remote bookmark head2 |
|
949 | adding remote bookmark head2 | |
928 | updating working directory |
|
950 | updating working directory | |
929 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
951 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
930 |
|
952 | |||
931 | $ ls shareremote |
|
953 | $ ls shareremote | |
932 | 195bb1fcdb595c14a6c13e0269129ed78f6debde |
|
954 | 195bb1fcdb595c14a6c13e0269129ed78f6debde | |
933 | c0d4f83847ca2a873741feb7048a45085fd47c46 |
|
955 | c0d4f83847ca2a873741feb7048a45085fd47c46 | |
934 |
|
956 | |||
935 | request to clone a single revision is respected in sharing mode |
|
957 | request to clone a single revision is respected in sharing mode | |
936 |
|
958 | |||
937 | $ hg --config share.pool=sharerevs clone -r 4a8dc1ab4c13 source1b share-1arev |
|
959 | $ hg --config share.pool=sharerevs clone -r 4a8dc1ab4c13 source1b share-1arev | |
938 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
960 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
939 | adding changesets |
|
961 | adding changesets | |
940 | adding manifests |
|
962 | adding manifests | |
941 | adding file changes |
|
963 | adding file changes | |
942 | added 2 changesets with 2 changes to 1 files |
|
964 | added 2 changesets with 2 changes to 1 files | |
943 | new changesets b5f04eac9d8f:4a8dc1ab4c13 |
|
965 | new changesets b5f04eac9d8f:4a8dc1ab4c13 | |
944 | no changes found |
|
966 | no changes found | |
945 | adding remote bookmark head1 |
|
967 | adding remote bookmark head1 | |
946 | updating working directory |
|
968 | updating working directory | |
947 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
969 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
948 |
|
970 | |||
949 | $ hg -R share-1arev log -G |
|
971 | $ hg -R share-1arev log -G | |
950 | @ changeset: 1:4a8dc1ab4c13 |
|
972 | @ changeset: 1:4a8dc1ab4c13 | |
951 | | bookmark: head1 |
|
973 | | bookmark: head1 | |
952 | | tag: tip |
|
974 | | tag: tip | |
953 | | user: test |
|
975 | | user: test | |
954 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
976 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
955 | | summary: head1 |
|
977 | | summary: head1 | |
956 | | |
|
978 | | | |
957 | o changeset: 0:b5f04eac9d8f |
|
979 | o changeset: 0:b5f04eac9d8f | |
958 | user: test |
|
980 | user: test | |
959 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
981 | date: Thu Jan 01 00:00:00 1970 +0000 | |
960 | summary: initial |
|
982 | summary: initial | |
961 |
|
983 | |||
962 |
|
984 | |||
963 | making another clone should only pull down requested rev |
|
985 | making another clone should only pull down requested rev | |
964 |
|
986 | |||
965 | $ hg --config share.pool=sharerevs clone -r 99f71071f117 source1b share-1brev |
|
987 | $ hg --config share.pool=sharerevs clone -r 99f71071f117 source1b share-1brev | |
966 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
988 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
967 | searching for changes |
|
989 | searching for changes | |
968 | adding changesets |
|
990 | adding changesets | |
969 | adding manifests |
|
991 | adding manifests | |
970 | adding file changes |
|
992 | adding file changes | |
971 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
993 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
972 | adding remote bookmark head1 |
|
994 | adding remote bookmark head1 | |
973 | adding remote bookmark head2 |
|
995 | adding remote bookmark head2 | |
974 | new changesets 99f71071f117 |
|
996 | new changesets 99f71071f117 | |
975 | updating working directory |
|
997 | updating working directory | |
976 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
998 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
977 |
|
999 | |||
978 | $ hg -R share-1brev log -G |
|
1000 | $ hg -R share-1brev log -G | |
979 | @ changeset: 2:99f71071f117 |
|
1001 | @ changeset: 2:99f71071f117 | |
980 | | bookmark: head2 |
|
1002 | | bookmark: head2 | |
981 | | tag: tip |
|
1003 | | tag: tip | |
982 | | parent: 0:b5f04eac9d8f |
|
1004 | | parent: 0:b5f04eac9d8f | |
983 | | user: test |
|
1005 | | user: test | |
984 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1006 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
985 | | summary: head2 |
|
1007 | | summary: head2 | |
986 | | |
|
1008 | | | |
987 | | o changeset: 1:4a8dc1ab4c13 |
|
1009 | | o changeset: 1:4a8dc1ab4c13 | |
988 | |/ bookmark: head1 |
|
1010 | |/ bookmark: head1 | |
989 | | user: test |
|
1011 | | user: test | |
990 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1012 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
991 | | summary: head1 |
|
1013 | | summary: head1 | |
992 | | |
|
1014 | | | |
993 | o changeset: 0:b5f04eac9d8f |
|
1015 | o changeset: 0:b5f04eac9d8f | |
994 | user: test |
|
1016 | user: test | |
995 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1017 | date: Thu Jan 01 00:00:00 1970 +0000 | |
996 | summary: initial |
|
1018 | summary: initial | |
997 |
|
1019 | |||
998 |
|
1020 | |||
999 | Request to clone a single branch is respected in sharing mode |
|
1021 | Request to clone a single branch is respected in sharing mode | |
1000 |
|
1022 | |||
1001 | $ hg --config share.pool=sharebranch clone -b branch1 source1b share-1bbranch1 |
|
1023 | $ hg --config share.pool=sharebranch clone -b branch1 source1b share-1bbranch1 | |
1002 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
1024 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
1003 | adding changesets |
|
1025 | adding changesets | |
1004 | adding manifests |
|
1026 | adding manifests | |
1005 | adding file changes |
|
1027 | adding file changes | |
1006 | added 2 changesets with 2 changes to 1 files |
|
1028 | added 2 changesets with 2 changes to 1 files | |
1007 | new changesets b5f04eac9d8f:5f92a6c1a1b1 |
|
1029 | new changesets b5f04eac9d8f:5f92a6c1a1b1 | |
1008 | no changes found |
|
1030 | no changes found | |
1009 | updating working directory |
|
1031 | updating working directory | |
1010 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1032 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1011 |
|
1033 | |||
1012 | $ hg -R share-1bbranch1 log -G |
|
1034 | $ hg -R share-1bbranch1 log -G | |
1013 | o changeset: 1:5f92a6c1a1b1 |
|
1035 | o changeset: 1:5f92a6c1a1b1 | |
1014 | | branch: branch1 |
|
1036 | | branch: branch1 | |
1015 | | tag: tip |
|
1037 | | tag: tip | |
1016 | | user: test |
|
1038 | | user: test | |
1017 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1039 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1018 | | summary: branch1 |
|
1040 | | summary: branch1 | |
1019 | | |
|
1041 | | | |
1020 | @ changeset: 0:b5f04eac9d8f |
|
1042 | @ changeset: 0:b5f04eac9d8f | |
1021 | user: test |
|
1043 | user: test | |
1022 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1044 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1023 | summary: initial |
|
1045 | summary: initial | |
1024 |
|
1046 | |||
1025 |
|
1047 | |||
1026 | $ hg --config share.pool=sharebranch clone -b branch2 source1b share-1bbranch2 |
|
1048 | $ hg --config share.pool=sharebranch clone -b branch2 source1b share-1bbranch2 | |
1027 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
1049 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
1028 | searching for changes |
|
1050 | searching for changes | |
1029 | adding changesets |
|
1051 | adding changesets | |
1030 | adding manifests |
|
1052 | adding manifests | |
1031 | adding file changes |
|
1053 | adding file changes | |
1032 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
1054 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
1033 | new changesets 6bacf4683960 |
|
1055 | new changesets 6bacf4683960 | |
1034 | updating working directory |
|
1056 | updating working directory | |
1035 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1057 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1036 |
|
1058 | |||
1037 | $ hg -R share-1bbranch2 log -G |
|
1059 | $ hg -R share-1bbranch2 log -G | |
1038 | o changeset: 2:6bacf4683960 |
|
1060 | o changeset: 2:6bacf4683960 | |
1039 | | branch: branch2 |
|
1061 | | branch: branch2 | |
1040 | | tag: tip |
|
1062 | | tag: tip | |
1041 | | parent: 0:b5f04eac9d8f |
|
1063 | | parent: 0:b5f04eac9d8f | |
1042 | | user: test |
|
1064 | | user: test | |
1043 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1065 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1044 | | summary: branch2 |
|
1066 | | summary: branch2 | |
1045 | | |
|
1067 | | | |
1046 | | o changeset: 1:5f92a6c1a1b1 |
|
1068 | | o changeset: 1:5f92a6c1a1b1 | |
1047 | |/ branch: branch1 |
|
1069 | |/ branch: branch1 | |
1048 | | user: test |
|
1070 | | user: test | |
1049 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1071 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1050 | | summary: branch1 |
|
1072 | | summary: branch1 | |
1051 | | |
|
1073 | | | |
1052 | @ changeset: 0:b5f04eac9d8f |
|
1074 | @ changeset: 0:b5f04eac9d8f | |
1053 | user: test |
|
1075 | user: test | |
1054 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1076 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1055 | summary: initial |
|
1077 | summary: initial | |
1056 |
|
1078 | |||
1057 |
|
1079 | |||
1058 | -U is respected in share clone mode |
|
1080 | -U is respected in share clone mode | |
1059 |
|
1081 | |||
1060 | $ hg --config share.pool=share clone -U source1a share-1anowc |
|
1082 | $ hg --config share.pool=share clone -U source1a share-1anowc | |
1061 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
1083 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
1062 | searching for changes |
|
1084 | searching for changes | |
1063 | no changes found |
|
1085 | no changes found | |
1064 | adding remote bookmark bookA |
|
1086 | adding remote bookmark bookA | |
1065 |
|
1087 | |||
1066 | $ ls share-1anowc |
|
1088 | $ ls share-1anowc | |
1067 |
|
1089 | |||
1068 | Test that auto sharing doesn't cause failure of "hg clone local remote" |
|
1090 | Test that auto sharing doesn't cause failure of "hg clone local remote" | |
1069 |
|
1091 | |||
1070 | $ cd $TESTTMP |
|
1092 | $ cd $TESTTMP | |
1071 | $ hg -R a id -r 0 |
|
1093 | $ hg -R a id -r 0 | |
1072 | acb14030fe0a |
|
1094 | acb14030fe0a | |
1073 | $ hg id -R remote -r 0 |
|
1095 | $ hg id -R remote -r 0 | |
1074 | abort: repository remote not found! |
|
1096 | abort: repository remote not found! | |
1075 | [255] |
|
1097 | [255] | |
1076 | $ hg --config share.pool=share -q clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" a ssh://user@dummy/remote |
|
1098 | $ hg --config share.pool=share -q clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" a ssh://user@dummy/remote | |
1077 | $ hg -R remote id -r 0 |
|
1099 | $ hg -R remote id -r 0 | |
1078 | acb14030fe0a |
|
1100 | acb14030fe0a | |
1079 |
|
1101 | |||
1080 | Cloning into pooled storage doesn't race (issue5104) |
|
1102 | Cloning into pooled storage doesn't race (issue5104) | |
1081 |
|
1103 | |||
1082 | $ HGPOSTLOCKDELAY=2.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace1 > race1.log 2>&1 & |
|
1104 | $ HGPOSTLOCKDELAY=2.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace1 > race1.log 2>&1 & | |
1083 | $ HGPRELOCKDELAY=1.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace2 > race2.log 2>&1 |
|
1105 | $ HGPRELOCKDELAY=1.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace2 > race2.log 2>&1 | |
1084 | $ wait |
|
1106 | $ wait | |
1085 |
|
1107 | |||
1086 | $ hg -R share-destrace1 log -r tip |
|
1108 | $ hg -R share-destrace1 log -r tip | |
1087 | changeset: 2:e5bfe23c0b47 |
|
1109 | changeset: 2:e5bfe23c0b47 | |
1088 | bookmark: bookA |
|
1110 | bookmark: bookA | |
1089 | tag: tip |
|
1111 | tag: tip | |
1090 | user: test |
|
1112 | user: test | |
1091 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1113 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1092 | summary: 1a |
|
1114 | summary: 1a | |
1093 |
|
1115 | |||
1094 |
|
1116 | |||
1095 | $ hg -R share-destrace2 log -r tip |
|
1117 | $ hg -R share-destrace2 log -r tip | |
1096 | changeset: 2:e5bfe23c0b47 |
|
1118 | changeset: 2:e5bfe23c0b47 | |
1097 | bookmark: bookA |
|
1119 | bookmark: bookA | |
1098 | tag: tip |
|
1120 | tag: tip | |
1099 | user: test |
|
1121 | user: test | |
1100 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1122 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1101 | summary: 1a |
|
1123 | summary: 1a | |
1102 |
|
1124 | |||
1103 | One repo should be new, the other should be shared from the pool. We |
|
1125 | One repo should be new, the other should be shared from the pool. We | |
1104 | don't care which is which, so we just make sure we always print the |
|
1126 | don't care which is which, so we just make sure we always print the | |
1105 | one containing "new pooled" first, then one one containing "existing |
|
1127 | one containing "new pooled" first, then one one containing "existing | |
1106 | pooled". |
|
1128 | pooled". | |
1107 |
|
1129 | |||
1108 | $ (grep 'new pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock |
|
1130 | $ (grep 'new pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock | |
1109 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
1131 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
1110 | requesting all changes |
|
1132 | requesting all changes | |
1111 | adding changesets |
|
1133 | adding changesets | |
1112 | adding manifests |
|
1134 | adding manifests | |
1113 | adding file changes |
|
1135 | adding file changes | |
1114 | added 3 changesets with 3 changes to 1 files |
|
1136 | added 3 changesets with 3 changes to 1 files | |
1115 | new changesets b5f04eac9d8f:e5bfe23c0b47 |
|
1137 | new changesets b5f04eac9d8f:e5bfe23c0b47 | |
1116 | searching for changes |
|
1138 | searching for changes | |
1117 | no changes found |
|
1139 | no changes found | |
1118 | adding remote bookmark bookA |
|
1140 | adding remote bookmark bookA | |
1119 | updating working directory |
|
1141 | updating working directory | |
1120 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1142 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1121 |
|
1143 | |||
1122 | $ (grep 'existing pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock |
|
1144 | $ (grep 'existing pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock | |
1123 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
1145 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
1124 | searching for changes |
|
1146 | searching for changes | |
1125 | no changes found |
|
1147 | no changes found | |
1126 | adding remote bookmark bookA |
|
1148 | adding remote bookmark bookA | |
1127 | updating working directory |
|
1149 | updating working directory | |
1128 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1150 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1129 |
|
1151 | |||
1130 | SEC: check for unsafe ssh url |
|
1152 | SEC: check for unsafe ssh url | |
1131 |
|
1153 | |||
1132 | $ cat >> $HGRCPATH << EOF |
|
1154 | $ cat >> $HGRCPATH << EOF | |
1133 | > [ui] |
|
1155 | > [ui] | |
1134 | > ssh = sh -c "read l; read l; read l" |
|
1156 | > ssh = sh -c "read l; read l; read l" | |
1135 | > EOF |
|
1157 | > EOF | |
1136 |
|
1158 | |||
1137 | $ hg clone 'ssh://-oProxyCommand=touch${IFS}owned/path' |
|
1159 | $ hg clone 'ssh://-oProxyCommand=touch${IFS}owned/path' | |
1138 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' |
|
1160 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' | |
1139 | [255] |
|
1161 | [255] | |
1140 | $ hg clone 'ssh://%2DoProxyCommand=touch${IFS}owned/path' |
|
1162 | $ hg clone 'ssh://%2DoProxyCommand=touch${IFS}owned/path' | |
1141 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' |
|
1163 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' | |
1142 | [255] |
|
1164 | [255] | |
1143 | $ hg clone 'ssh://fakehost|touch%20owned/path' |
|
1165 | $ hg clone 'ssh://fakehost|touch%20owned/path' | |
1144 | abort: no suitable response from remote hg! |
|
1166 | abort: no suitable response from remote hg! | |
1145 | [255] |
|
1167 | [255] | |
1146 | $ hg clone 'ssh://fakehost%7Ctouch%20owned/path' |
|
1168 | $ hg clone 'ssh://fakehost%7Ctouch%20owned/path' | |
1147 | abort: no suitable response from remote hg! |
|
1169 | abort: no suitable response from remote hg! | |
1148 | [255] |
|
1170 | [255] | |
1149 |
|
1171 | |||
1150 | $ hg clone 'ssh://-oProxyCommand=touch owned%20foo@example.com/nonexistent/path' |
|
1172 | $ hg clone 'ssh://-oProxyCommand=touch owned%20foo@example.com/nonexistent/path' | |
1151 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch owned foo@example.com/nonexistent/path' |
|
1173 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch owned foo@example.com/nonexistent/path' | |
1152 | [255] |
|
1174 | [255] | |
1153 |
|
1175 | |||
1154 | #if windows |
|
1176 | #if windows | |
1155 | $ hg clone "ssh://%26touch%20owned%20/" --debug |
|
1177 | $ hg clone "ssh://%26touch%20owned%20/" --debug | |
1156 | running sh -c "read l; read l; read l" "&touch owned " "hg -R . serve --stdio" |
|
1178 | running sh -c "read l; read l; read l" "&touch owned " "hg -R . serve --stdio" | |
1157 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) |
|
1179 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) | |
1158 | sending hello command |
|
1180 | sending hello command | |
1159 | sending between command |
|
1181 | sending between command | |
1160 | abort: no suitable response from remote hg! |
|
1182 | abort: no suitable response from remote hg! | |
1161 | [255] |
|
1183 | [255] | |
1162 | $ hg clone "ssh://example.com:%26touch%20owned%20/" --debug |
|
1184 | $ hg clone "ssh://example.com:%26touch%20owned%20/" --debug | |
1163 | running sh -c "read l; read l; read l" -p "&touch owned " example.com "hg -R . serve --stdio" |
|
1185 | running sh -c "read l; read l; read l" -p "&touch owned " example.com "hg -R . serve --stdio" | |
1164 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) |
|
1186 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) | |
1165 | sending hello command |
|
1187 | sending hello command | |
1166 | sending between command |
|
1188 | sending between command | |
1167 | abort: no suitable response from remote hg! |
|
1189 | abort: no suitable response from remote hg! | |
1168 | [255] |
|
1190 | [255] | |
1169 | #else |
|
1191 | #else | |
1170 | $ hg clone "ssh://%3btouch%20owned%20/" --debug |
|
1192 | $ hg clone "ssh://%3btouch%20owned%20/" --debug | |
1171 | running sh -c "read l; read l; read l" ';touch owned ' 'hg -R . serve --stdio' |
|
1193 | running sh -c "read l; read l; read l" ';touch owned ' 'hg -R . serve --stdio' | |
1172 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) |
|
1194 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) | |
1173 | sending hello command |
|
1195 | sending hello command | |
1174 | sending between command |
|
1196 | sending between command | |
1175 | abort: no suitable response from remote hg! |
|
1197 | abort: no suitable response from remote hg! | |
1176 | [255] |
|
1198 | [255] | |
1177 | $ hg clone "ssh://example.com:%3btouch%20owned%20/" --debug |
|
1199 | $ hg clone "ssh://example.com:%3btouch%20owned%20/" --debug | |
1178 | running sh -c "read l; read l; read l" -p ';touch owned ' example.com 'hg -R . serve --stdio' |
|
1200 | running sh -c "read l; read l; read l" -p ';touch owned ' example.com 'hg -R . serve --stdio' | |
1179 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) |
|
1201 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) | |
1180 | sending hello command |
|
1202 | sending hello command | |
1181 | sending between command |
|
1203 | sending between command | |
1182 | abort: no suitable response from remote hg! |
|
1204 | abort: no suitable response from remote hg! | |
1183 | [255] |
|
1205 | [255] | |
1184 | #endif |
|
1206 | #endif | |
1185 |
|
1207 | |||
1186 | $ hg clone "ssh://v-alid.example.com/" --debug |
|
1208 | $ hg clone "ssh://v-alid.example.com/" --debug | |
1187 | running sh -c "read l; read l; read l" v-alid\.example\.com ['"]hg -R \. serve --stdio['"] (re) |
|
1209 | running sh -c "read l; read l; read l" v-alid\.example\.com ['"]hg -R \. serve --stdio['"] (re) | |
1188 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) |
|
1210 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) | |
1189 | sending hello command |
|
1211 | sending hello command | |
1190 | sending between command |
|
1212 | sending between command | |
1191 | abort: no suitable response from remote hg! |
|
1213 | abort: no suitable response from remote hg! | |
1192 | [255] |
|
1214 | [255] | |
1193 |
|
1215 | |||
1194 | We should not have created a file named owned - if it exists, the |
|
1216 | We should not have created a file named owned - if it exists, the | |
1195 | attack succeeded. |
|
1217 | attack succeeded. | |
1196 | $ if test -f owned; then echo 'you got owned'; fi |
|
1218 | $ if test -f owned; then echo 'you got owned'; fi | |
1197 |
|
1219 | |||
1198 | Cloning without fsmonitor enabled does not print a warning for small repos |
|
1220 | Cloning without fsmonitor enabled does not print a warning for small repos | |
1199 |
|
1221 | |||
1200 | $ hg clone a fsmonitor-default |
|
1222 | $ hg clone a fsmonitor-default | |
1201 | updating to bookmark @ on branch stable |
|
1223 | updating to bookmark @ on branch stable | |
1202 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1224 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1203 |
|
1225 | |||
1204 | Lower the warning threshold to simulate a large repo |
|
1226 | Lower the warning threshold to simulate a large repo | |
1205 |
|
1227 | |||
1206 | $ cat >> $HGRCPATH << EOF |
|
1228 | $ cat >> $HGRCPATH << EOF | |
1207 | > [fsmonitor] |
|
1229 | > [fsmonitor] | |
1208 | > warn_update_file_count = 2 |
|
1230 | > warn_update_file_count = 2 | |
1209 | > EOF |
|
1231 | > EOF | |
1210 |
|
1232 | |||
1211 | We should see a warning about no fsmonitor on supported platforms |
|
1233 | We should see a warning about no fsmonitor on supported platforms | |
1212 |
|
1234 | |||
1213 | #if linuxormacos no-fsmonitor |
|
1235 | #if linuxormacos no-fsmonitor | |
1214 | $ hg clone a nofsmonitor |
|
1236 | $ hg clone a nofsmonitor | |
1215 | updating to bookmark @ on branch stable |
|
1237 | updating to bookmark @ on branch stable | |
1216 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") |
|
1238 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") | |
1217 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1239 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1218 | #else |
|
1240 | #else | |
1219 | $ hg clone a nofsmonitor |
|
1241 | $ hg clone a nofsmonitor | |
1220 | updating to bookmark @ on branch stable |
|
1242 | updating to bookmark @ on branch stable | |
1221 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1243 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1222 | #endif |
|
1244 | #endif | |
1223 |
|
1245 | |||
1224 | We should not see warning about fsmonitor when it is enabled |
|
1246 | We should not see warning about fsmonitor when it is enabled | |
1225 |
|
1247 | |||
1226 | #if fsmonitor |
|
1248 | #if fsmonitor | |
1227 | $ hg clone a fsmonitor-enabled |
|
1249 | $ hg clone a fsmonitor-enabled | |
1228 | updating to bookmark @ on branch stable |
|
1250 | updating to bookmark @ on branch stable | |
1229 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1251 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1230 | #endif |
|
1252 | #endif | |
1231 |
|
1253 | |||
1232 | We can disable the fsmonitor warning |
|
1254 | We can disable the fsmonitor warning | |
1233 |
|
1255 | |||
1234 | $ hg --config fsmonitor.warn_when_unused=false clone a fsmonitor-disable-warning |
|
1256 | $ hg --config fsmonitor.warn_when_unused=false clone a fsmonitor-disable-warning | |
1235 | updating to bookmark @ on branch stable |
|
1257 | updating to bookmark @ on branch stable | |
1236 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1258 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1237 |
|
1259 | |||
1238 | Loaded fsmonitor but disabled in config should still print warning |
|
1260 | Loaded fsmonitor but disabled in config should still print warning | |
1239 |
|
1261 | |||
1240 | #if linuxormacos fsmonitor |
|
1262 | #if linuxormacos fsmonitor | |
1241 | $ hg --config fsmonitor.mode=off clone a fsmonitor-mode-off |
|
1263 | $ hg --config fsmonitor.mode=off clone a fsmonitor-mode-off | |
1242 | updating to bookmark @ on branch stable |
|
1264 | updating to bookmark @ on branch stable | |
1243 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") (fsmonitor !) |
|
1265 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") (fsmonitor !) | |
1244 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1266 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1245 | #endif |
|
1267 | #endif | |
1246 |
|
1268 | |||
1247 | Warning not printed if working directory isn't empty |
|
1269 | Warning not printed if working directory isn't empty | |
1248 |
|
1270 | |||
1249 | $ hg -q clone a fsmonitor-update |
|
1271 | $ hg -q clone a fsmonitor-update | |
1250 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") (?) |
|
1272 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") (?) | |
1251 | $ cd fsmonitor-update |
|
1273 | $ cd fsmonitor-update | |
1252 | $ hg up acb14030fe0a |
|
1274 | $ hg up acb14030fe0a | |
1253 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1275 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1254 | (leaving bookmark @) |
|
1276 | (leaving bookmark @) | |
1255 | $ hg up cf0fe1914066 |
|
1277 | $ hg up cf0fe1914066 | |
1256 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1278 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1257 |
|
1279 | |||
1258 | `hg update` from null revision also prints |
|
1280 | `hg update` from null revision also prints | |
1259 |
|
1281 | |||
1260 | $ hg up null |
|
1282 | $ hg up null | |
1261 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1283 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1262 |
|
1284 | |||
1263 | #if linuxormacos no-fsmonitor |
|
1285 | #if linuxormacos no-fsmonitor | |
1264 | $ hg up cf0fe1914066 |
|
1286 | $ hg up cf0fe1914066 | |
1265 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") |
|
1287 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") | |
1266 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1288 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1267 | #else |
|
1289 | #else | |
1268 | $ hg up cf0fe1914066 |
|
1290 | $ hg up cf0fe1914066 | |
1269 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1291 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1270 | #endif |
|
1292 | #endif | |
1271 |
|
1293 | |||
1272 | $ cd .. |
|
1294 | $ cd .. | |
1273 |
|
1295 |
@@ -1,202 +1,207 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > convert= |
|
3 | > convert= | |
4 | > [convert] |
|
4 | > [convert] | |
5 | > hg.saverev=False |
|
5 | > hg.saverev=False | |
6 | > EOF |
|
6 | > EOF | |
7 | $ hg init orig |
|
7 | $ hg init orig | |
8 | $ cd orig |
|
8 | $ cd orig | |
9 | $ echo foo > foo |
|
9 | $ echo foo > foo | |
10 | $ echo bar > bar |
|
10 | $ echo bar > bar | |
11 | $ hg ci -qAm 'add foo bar' -d '0 0' |
|
11 | $ hg ci -qAm 'add foo bar' -d '0 0' | |
12 | $ echo >> foo |
|
12 | $ echo >> foo | |
13 | $ hg ci -m 'change foo' -d '1 0' |
|
13 | $ hg ci -m 'change foo' -d '1 0' | |
14 | $ hg up -qC 0 |
|
14 | $ hg up -qC 0 | |
15 | $ hg copy --after --force foo bar |
|
15 | $ hg copy --after --force foo bar | |
16 | $ hg copy foo baz |
|
16 | $ hg copy foo baz | |
17 | $ hg ci -m 'make bar and baz copies of foo' -d '2 0' |
|
17 | $ hg ci -m 'make bar and baz copies of foo' -d '2 0' | |
18 | created new head |
|
18 | created new head | |
19 |
|
19 | |||
20 | Test that template can print all file copies (issue4362) |
|
20 | Test that template can print all file copies (issue4362) | |
21 | $ hg log -r . --template "{file_copies % ' File: {file_copy}\n'}" |
|
21 | $ hg log -r . --template "{file_copies % ' File: {file_copy}\n'}" | |
22 | File: bar (foo) |
|
22 | File: bar (foo) | |
23 | File: baz (foo) |
|
23 | File: baz (foo) | |
24 |
|
24 | |||
25 | $ hg bookmark premerge1 |
|
25 | $ hg bookmark premerge1 | |
26 | $ hg merge -r 1 |
|
26 | $ hg merge -r 1 | |
27 | merging baz and foo to baz |
|
27 | merging baz and foo to baz | |
28 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
28 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
29 | (branch merge, don't forget to commit) |
|
29 | (branch merge, don't forget to commit) | |
30 | $ hg ci -m 'merge local copy' -d '3 0' |
|
30 | $ hg ci -m 'merge local copy' -d '3 0' | |
31 | $ hg up -C 1 |
|
31 | $ hg up -C 1 | |
32 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
32 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
33 | (leaving bookmark premerge1) |
|
33 | (leaving bookmark premerge1) | |
34 | $ hg bookmark premerge2 |
|
34 | $ hg bookmark premerge2 | |
35 | $ hg merge 2 |
|
35 | $ hg merge 2 | |
36 | merging foo and baz to baz |
|
36 | merging foo and baz to baz | |
37 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
37 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
38 | (branch merge, don't forget to commit) |
|
38 | (branch merge, don't forget to commit) | |
39 | $ hg ci -m 'merge remote copy' -d '4 0' |
|
39 | $ hg ci -m 'merge remote copy' -d '4 0' | |
40 | created new head |
|
40 | created new head | |
41 |
|
41 | |||
42 | Make and delete some tags |
|
42 | Make and delete some tags | |
43 |
|
43 | |||
44 | $ hg tag that |
|
44 | $ hg tag that | |
45 | $ hg tag --remove that |
|
45 | $ hg tag --remove that | |
46 | $ hg tag this |
|
46 | $ hg tag this | |
47 |
|
47 | |||
48 | #if execbit |
|
48 | #if execbit | |
49 | $ chmod +x baz |
|
49 | $ chmod +x baz | |
50 | #else |
|
50 | #else | |
51 | $ echo some other change to make sure we get a rev 5 > baz |
|
51 | $ echo some other change to make sure we get a rev 5 > baz | |
52 | #endif |
|
52 | #endif | |
53 | $ hg ci -m 'mark baz executable' -d '5 0' |
|
53 | $ hg ci -m 'mark baz executable' -d '5 0' | |
54 | $ cd .. |
|
54 | $ cd .. | |
55 | $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' |
|
55 | $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' | |
56 | initializing destination new repository |
|
56 | initializing destination new repository | |
57 | scanning source... |
|
57 | scanning source... | |
58 | sorting... |
|
58 | sorting... | |
59 | converting... |
|
59 | converting... | |
60 | 8 add foo bar |
|
60 | 8 add foo bar | |
61 | 7 change foo |
|
61 | 7 change foo | |
62 | 6 make bar and baz copies of foo |
|
62 | 6 make bar and baz copies of foo | |
63 | 5 merge local copy |
|
63 | 5 merge local copy | |
64 | 4 merge remote copy |
|
64 | 4 merge remote copy | |
65 | 3 Added tag that for changeset 88586c4e9f02 |
|
65 | 3 Added tag that for changeset 88586c4e9f02 | |
66 | 2 Removed tag that |
|
66 | 2 Removed tag that | |
67 | 1 Added tag this for changeset c56a7f387039 |
|
67 | 1 Added tag this for changeset c56a7f387039 | |
68 | 0 mark baz executable |
|
68 | 0 mark baz executable | |
69 | updating bookmarks |
|
69 | updating bookmarks | |
70 | $ cd new |
|
70 | $ cd new | |
71 | $ hg out ../orig |
|
71 | $ hg out ../orig | |
72 | comparing with ../orig |
|
72 | comparing with ../orig | |
73 | searching for changes |
|
73 | searching for changes | |
74 | no changes found |
|
74 | no changes found | |
75 | [1] |
|
75 | [1] | |
76 | #if execbit |
|
76 | #if execbit | |
77 | $ hg bookmarks |
|
77 | $ hg bookmarks | |
78 | premerge1 3:973ef48a98a4 |
|
78 | premerge1 3:973ef48a98a4 | |
79 | premerge2 8:91d107c423ba |
|
79 | premerge2 8:91d107c423ba | |
80 | #else |
|
80 | #else | |
81 | Different hash because no x bit |
|
81 | Different hash because no x bit | |
82 | $ hg bookmarks |
|
82 | $ hg bookmarks | |
83 | premerge1 3:973ef48a98a4 |
|
83 | premerge1 3:973ef48a98a4 | |
84 | premerge2 8:3537b15eaaca |
|
84 | premerge2 8:3537b15eaaca | |
85 | #endif |
|
85 | #endif | |
86 |
|
86 | |||
87 | Test that redoing a convert results in an identical graph |
|
87 | Test that redoing a convert results in an identical graph | |
88 | $ cd ../ |
|
88 | $ cd ../ | |
89 | $ rm new/.hg/shamap |
|
89 | $ rm new/.hg/shamap | |
90 | $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' |
|
90 | $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' | |
91 | scanning source... |
|
91 | scanning source... | |
92 | sorting... |
|
92 | sorting... | |
93 | converting... |
|
93 | converting... | |
94 | 8 add foo bar |
|
94 | 8 add foo bar | |
95 | 7 change foo |
|
95 | 7 change foo | |
96 | 6 make bar and baz copies of foo |
|
96 | 6 make bar and baz copies of foo | |
97 | 5 merge local copy |
|
97 | 5 merge local copy | |
98 | 4 merge remote copy |
|
98 | 4 merge remote copy | |
99 | 3 Added tag that for changeset 88586c4e9f02 |
|
99 | 3 Added tag that for changeset 88586c4e9f02 | |
100 | 2 Removed tag that |
|
100 | 2 Removed tag that | |
101 | 1 Added tag this for changeset c56a7f387039 |
|
101 | 1 Added tag this for changeset c56a7f387039 | |
102 | 0 mark baz executable |
|
102 | 0 mark baz executable | |
103 | updating bookmarks |
|
103 | updating bookmarks | |
104 | $ hg -R new log -G -T '{rev} {desc}' |
|
104 | $ hg -R new log -G -T '{rev} {desc}' | |
105 | o 8 mark baz executable |
|
105 | o 8 mark baz executable | |
106 | | |
|
106 | | | |
107 | o 7 Added tag this for changeset c56a7f387039 |
|
107 | o 7 Added tag this for changeset c56a7f387039 | |
108 | | |
|
108 | | | |
109 | o 6 Removed tag that |
|
109 | o 6 Removed tag that | |
110 | | |
|
110 | | | |
111 | o 5 Added tag that for changeset 88586c4e9f02 |
|
111 | o 5 Added tag that for changeset 88586c4e9f02 | |
112 | | |
|
112 | | | |
113 | o 4 merge remote copy |
|
113 | o 4 merge remote copy | |
114 | |\ |
|
114 | |\ | |
115 | +---o 3 merge local copy |
|
115 | +---o 3 merge local copy | |
116 | | |/ |
|
116 | | |/ | |
117 | | o 2 make bar and baz copies of foo |
|
117 | | o 2 make bar and baz copies of foo | |
118 | | | |
|
118 | | | | |
119 | o | 1 change foo |
|
119 | o | 1 change foo | |
120 | |/ |
|
120 | |/ | |
121 | o 0 add foo bar |
|
121 | o 0 add foo bar | |
122 |
|
122 | |||
123 |
|
123 | |||
124 | check shamap LF and CRLF handling |
|
124 | check shamap LF and CRLF handling | |
125 |
|
125 | |||
126 | $ cat > rewrite.py <<EOF |
|
126 | $ cat > rewrite.py <<EOF | |
127 | > import sys |
|
127 | > import sys | |
128 | > # Interlace LF and CRLF |
|
128 | > # Interlace LF and CRLF | |
129 | > lines = [(l.rstrip() + ((i % 2) and b'\n' or b'\r\n')) |
|
129 | > lines = [(l.rstrip() + ((i % 2) and b'\n' or b'\r\n')) | |
130 | > for i, l in enumerate(open(sys.argv[1], 'rb'))] |
|
130 | > for i, l in enumerate(open(sys.argv[1], 'rb'))] | |
131 | > open(sys.argv[1], 'wb').write(b''.join(lines)) |
|
131 | > open(sys.argv[1], 'wb').write(b''.join(lines)) | |
132 | > EOF |
|
132 | > EOF | |
133 | $ $PYTHON rewrite.py new/.hg/shamap |
|
133 | $ $PYTHON rewrite.py new/.hg/shamap | |
134 | $ cd orig |
|
134 | $ cd orig | |
135 | $ hg up -qC 1 |
|
135 | $ hg up -qC 1 | |
136 | $ echo foo >> foo |
|
136 | $ echo foo >> foo | |
137 | $ hg ci -qm 'change foo again' |
|
137 | $ hg ci -qm 'change foo again' | |
138 | $ hg up -qC 2 |
|
138 | $ hg up -qC 2 | |
139 | $ echo foo >> foo |
|
139 | $ echo foo >> foo | |
140 | $ hg ci -qm 'change foo again again' |
|
140 | $ hg ci -qm 'change foo again again' | |
141 | $ cd .. |
|
141 | $ cd .. | |
142 | $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' |
|
142 | $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' | |
143 | scanning source... |
|
143 | scanning source... | |
144 | sorting... |
|
144 | sorting... | |
145 | converting... |
|
145 | converting... | |
146 | 1 change foo again again |
|
146 | 1 change foo again again | |
147 | 0 change foo again |
|
147 | 0 change foo again | |
148 | updating bookmarks |
|
148 | updating bookmarks | |
149 |
|
149 | |||
150 | init broken repository |
|
150 | init broken repository | |
151 |
|
151 | |||
152 | $ hg init broken |
|
152 | $ hg init broken | |
153 | $ cd broken |
|
153 | $ cd broken | |
154 | $ echo a >> a |
|
154 | $ echo a >> a | |
155 | $ echo b >> b |
|
155 | $ echo b >> b | |
156 | $ hg ci -qAm init |
|
156 | $ hg ci -qAm init | |
157 | $ echo a >> a |
|
157 | $ echo a >> a | |
158 | $ echo b >> b |
|
158 | $ echo b >> b | |
159 | $ hg copy b c |
|
159 | $ hg copy b c | |
160 | $ hg ci -qAm changeall |
|
160 | $ hg ci -qAm changeall | |
161 | $ hg up -qC 0 |
|
161 | $ hg up -qC 0 | |
162 | $ echo bc >> b |
|
162 | $ echo bc >> b | |
163 | $ hg ci -m changebagain |
|
163 | $ hg ci -m changebagain | |
164 | created new head |
|
164 | created new head | |
165 | $ HGMERGE=internal:local hg -q merge |
|
165 | $ HGMERGE=internal:local hg -q merge | |
166 | $ hg ci -m merge |
|
166 | $ hg ci -m merge | |
167 | $ hg mv b d |
|
167 | $ hg mv b d | |
168 | $ hg ci -m moveb |
|
168 | $ hg ci -m moveb | |
169 |
|
169 | |||
170 | break it |
|
170 | break it | |
171 |
|
171 | |||
|
172 | #if reporevlogstore | |||
172 | $ rm .hg/store/data/b.* |
|
173 | $ rm .hg/store/data/b.* | |
|
174 | #endif | |||
|
175 | #if reposimplestore | |||
|
176 | $ rm .hg/store/data/b/* | |||
|
177 | #endif | |||
173 | $ cd .. |
|
178 | $ cd .. | |
174 | $ hg --config convert.hg.ignoreerrors=True convert broken fixed |
|
179 | $ hg --config convert.hg.ignoreerrors=True convert broken fixed | |
175 | initializing destination fixed repository |
|
180 | initializing destination fixed repository | |
176 | scanning source... |
|
181 | scanning source... | |
177 | sorting... |
|
182 | sorting... | |
178 | converting... |
|
183 | converting... | |
179 | 4 init |
|
184 | 4 init | |
180 | ignoring: data/b.i@1e88685f5dde: no match found |
|
185 | ignoring: data/b.i@1e88685f5dde: no match found | |
181 | 3 changeall |
|
186 | 3 changeall | |
182 | 2 changebagain |
|
187 | 2 changebagain | |
183 | 1 merge |
|
188 | 1 merge | |
184 | 0 moveb |
|
189 | 0 moveb | |
185 | $ hg -R fixed verify |
|
190 | $ hg -R fixed verify | |
186 | checking changesets |
|
191 | checking changesets | |
187 | checking manifests |
|
192 | checking manifests | |
188 | crosschecking files in changesets and manifests |
|
193 | crosschecking files in changesets and manifests | |
189 | checking files |
|
194 | checking files | |
190 | 3 files, 5 changesets, 5 total revisions |
|
195 | 3 files, 5 changesets, 5 total revisions | |
191 |
|
196 | |||
192 | manifest -r 0 |
|
197 | manifest -r 0 | |
193 |
|
198 | |||
194 | $ hg -R fixed manifest -r 0 |
|
199 | $ hg -R fixed manifest -r 0 | |
195 | a |
|
200 | a | |
196 |
|
201 | |||
197 | manifest -r tip |
|
202 | manifest -r tip | |
198 |
|
203 | |||
199 | $ hg -R fixed manifest -r tip |
|
204 | $ hg -R fixed manifest -r tip | |
200 | a |
|
205 | a | |
201 | c |
|
206 | c | |
202 | d |
|
207 | d |
@@ -1,374 +1,392 b'' | |||||
1 | #testcases flat tree |
|
1 | #testcases flat tree | |
2 |
|
2 | |||
3 | $ . "$TESTDIR/narrow-library.sh" |
|
3 | $ . "$TESTDIR/narrow-library.sh" | |
4 |
|
4 | |||
5 | #if tree |
|
5 | #if tree | |
6 | $ cat << EOF >> $HGRCPATH |
|
6 | $ cat << EOF >> $HGRCPATH | |
7 | > [experimental] |
|
7 | > [experimental] | |
8 | > treemanifest = 1 |
|
8 | > treemanifest = 1 | |
9 | > EOF |
|
9 | > EOF | |
10 | #endif |
|
10 | #endif | |
11 |
|
11 | |||
12 | $ hg init master |
|
12 | $ hg init master | |
13 | $ cd master |
|
13 | $ cd master | |
14 | $ cat >> .hg/hgrc <<EOF |
|
14 | $ cat >> .hg/hgrc <<EOF | |
15 | > [narrow] |
|
15 | > [narrow] | |
16 | > serveellipses=True |
|
16 | > serveellipses=True | |
17 | > EOF |
|
17 | > EOF | |
18 | $ for x in `$TESTDIR/seq.py 0 10` |
|
18 | $ for x in `$TESTDIR/seq.py 0 10` | |
19 | > do |
|
19 | > do | |
20 | > mkdir d$x |
|
20 | > mkdir d$x | |
21 | > echo $x > d$x/f |
|
21 | > echo $x > d$x/f | |
22 | > hg add d$x/f |
|
22 | > hg add d$x/f | |
23 | > hg commit -m "add d$x/f" |
|
23 | > hg commit -m "add d$x/f" | |
24 | > done |
|
24 | > done | |
25 | $ hg log -T "{node|short}: {desc}\n" |
|
25 | $ hg log -T "{node|short}: {desc}\n" | |
26 | *: add d10/f (glob) |
|
26 | *: add d10/f (glob) | |
27 | *: add d9/f (glob) |
|
27 | *: add d9/f (glob) | |
28 | *: add d8/f (glob) |
|
28 | *: add d8/f (glob) | |
29 | *: add d7/f (glob) |
|
29 | *: add d7/f (glob) | |
30 | *: add d6/f (glob) |
|
30 | *: add d6/f (glob) | |
31 | *: add d5/f (glob) |
|
31 | *: add d5/f (glob) | |
32 | *: add d4/f (glob) |
|
32 | *: add d4/f (glob) | |
33 | *: add d3/f (glob) |
|
33 | *: add d3/f (glob) | |
34 | *: add d2/f (glob) |
|
34 | *: add d2/f (glob) | |
35 | *: add d1/f (glob) |
|
35 | *: add d1/f (glob) | |
36 | *: add d0/f (glob) |
|
36 | *: add d0/f (glob) | |
37 | $ cd .. |
|
37 | $ cd .. | |
38 |
|
38 | |||
39 | Error if '.' or '..' are in the directory to track. |
|
39 | Error if '.' or '..' are in the directory to track. | |
40 | $ hg clone --narrow ssh://user@dummy/master foo --include ./asdf |
|
40 | $ hg clone --narrow ssh://user@dummy/master foo --include ./asdf | |
41 | requesting all changes |
|
41 | requesting all changes | |
42 | abort: "." and ".." are not allowed in narrowspec paths |
|
42 | abort: "." and ".." are not allowed in narrowspec paths | |
43 | [255] |
|
43 | [255] | |
44 | $ hg clone --narrow ssh://user@dummy/master foo --include asdf/.. |
|
44 | $ hg clone --narrow ssh://user@dummy/master foo --include asdf/.. | |
45 | requesting all changes |
|
45 | requesting all changes | |
46 | abort: "." and ".." are not allowed in narrowspec paths |
|
46 | abort: "." and ".." are not allowed in narrowspec paths | |
47 | [255] |
|
47 | [255] | |
48 | $ hg clone --narrow ssh://user@dummy/master foo --include a/./c |
|
48 | $ hg clone --narrow ssh://user@dummy/master foo --include a/./c | |
49 | requesting all changes |
|
49 | requesting all changes | |
50 | abort: "." and ".." are not allowed in narrowspec paths |
|
50 | abort: "." and ".." are not allowed in narrowspec paths | |
51 | [255] |
|
51 | [255] | |
52 |
|
52 | |||
53 | Names with '.' in them are OK. |
|
53 | Names with '.' in them are OK. | |
54 | $ hg clone --narrow ssh://user@dummy/master should-work --include a/.b/c |
|
54 | $ hg clone --narrow ssh://user@dummy/master should-work --include a/.b/c | |
55 | requesting all changes |
|
55 | requesting all changes | |
56 | adding changesets |
|
56 | adding changesets | |
57 | adding manifests |
|
57 | adding manifests | |
58 | adding file changes |
|
58 | adding file changes | |
59 | added 1 changesets with 0 changes to 0 files |
|
59 | added 1 changesets with 0 changes to 0 files | |
60 | new changesets * (glob) |
|
60 | new changesets * (glob) | |
61 | updating to branch default |
|
61 | updating to branch default | |
62 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
62 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
63 |
|
63 | |||
64 | Test repo with local changes |
|
64 | Test repo with local changes | |
65 | $ hg clone --narrow ssh://user@dummy/master narrow-local-changes --include d0 --include d3 --include d6 |
|
65 | $ hg clone --narrow ssh://user@dummy/master narrow-local-changes --include d0 --include d3 --include d6 | |
66 | requesting all changes |
|
66 | requesting all changes | |
67 | adding changesets |
|
67 | adding changesets | |
68 | adding manifests |
|
68 | adding manifests | |
69 | adding file changes |
|
69 | adding file changes | |
70 | added 6 changesets with 3 changes to 3 files |
|
70 | added 6 changesets with 3 changes to 3 files | |
71 | new changesets *:* (glob) |
|
71 | new changesets *:* (glob) | |
72 | updating to branch default |
|
72 | updating to branch default | |
73 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
73 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
74 | $ cd narrow-local-changes |
|
74 | $ cd narrow-local-changes | |
75 | $ cat >> $HGRCPATH << EOF |
|
75 | $ cat >> $HGRCPATH << EOF | |
76 | > [experimental] |
|
76 | > [experimental] | |
77 | > evolution=createmarkers |
|
77 | > evolution=createmarkers | |
78 | > EOF |
|
78 | > EOF | |
79 | $ echo local change >> d0/f |
|
79 | $ echo local change >> d0/f | |
80 | $ hg ci -m 'local change to d0' |
|
80 | $ hg ci -m 'local change to d0' | |
81 | $ hg co '.^' |
|
81 | $ hg co '.^' | |
82 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
82 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
83 | $ echo local change >> d3/f |
|
83 | $ echo local change >> d3/f | |
84 | $ hg ci -m 'local hidden change to d3' |
|
84 | $ hg ci -m 'local hidden change to d3' | |
85 | created new head |
|
85 | created new head | |
86 | $ hg ci --amend -m 'local change to d3' |
|
86 | $ hg ci --amend -m 'local change to d3' | |
87 | $ hg tracked --removeinclude d0 |
|
87 | $ hg tracked --removeinclude d0 | |
88 | comparing with ssh://user@dummy/master |
|
88 | comparing with ssh://user@dummy/master | |
89 | searching for changes |
|
89 | searching for changes | |
90 | looking for local changes to affected paths |
|
90 | looking for local changes to affected paths | |
91 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
91 | The following changeset(s) or their ancestors have local changes not on the remote: | |
92 | * (glob) |
|
92 | * (glob) | |
93 | abort: local changes found |
|
93 | abort: local changes found | |
94 | (use --force-delete-local-changes to ignore) |
|
94 | (use --force-delete-local-changes to ignore) | |
95 | [255] |
|
95 | [255] | |
96 | Check that nothing was removed by the failed attempts |
|
96 | Check that nothing was removed by the failed attempts | |
97 | $ hg tracked |
|
97 | $ hg tracked | |
98 | I path:d0 |
|
98 | I path:d0 | |
99 | I path:d3 |
|
99 | I path:d3 | |
100 | I path:d6 |
|
100 | I path:d6 | |
101 | $ hg files |
|
101 | $ hg files | |
102 | d0/f |
|
102 | d0/f | |
103 | d3/f |
|
103 | d3/f | |
104 | d6/f |
|
104 | d6/f | |
105 | $ find * |
|
105 | $ find * | |
106 | d0 |
|
106 | d0 | |
107 | d0/f |
|
107 | d0/f | |
108 | d3 |
|
108 | d3 | |
109 | d3/f |
|
109 | d3/f | |
110 | d6 |
|
110 | d6 | |
111 | d6/f |
|
111 | d6/f | |
112 | $ hg verify -q |
|
112 | $ hg verify -q | |
113 | Force deletion of local changes |
|
113 | Force deletion of local changes | |
114 | $ hg log -T "{node|short}: {desc} {outsidenarrow}\n" |
|
114 | $ hg log -T "{node|short}: {desc} {outsidenarrow}\n" | |
115 | *: local change to d3 (glob) |
|
115 | *: local change to d3 (glob) | |
116 | *: local change to d0 (glob) |
|
116 | *: local change to d0 (glob) | |
117 | *: add d10/f outsidenarrow (glob) |
|
117 | *: add d10/f outsidenarrow (glob) | |
118 | *: add d6/f (glob) |
|
118 | *: add d6/f (glob) | |
119 | *: add d5/f outsidenarrow (glob) |
|
119 | *: add d5/f outsidenarrow (glob) | |
120 | *: add d3/f (glob) |
|
120 | *: add d3/f (glob) | |
121 | *: add d2/f outsidenarrow (glob) |
|
121 | *: add d2/f outsidenarrow (glob) | |
122 | *: add d0/f (glob) |
|
122 | *: add d0/f (glob) | |
123 | $ hg tracked --removeinclude d0 --force-delete-local-changes |
|
123 | $ hg tracked --removeinclude d0 --force-delete-local-changes | |
124 | comparing with ssh://user@dummy/master |
|
124 | comparing with ssh://user@dummy/master | |
125 | searching for changes |
|
125 | searching for changes | |
126 | looking for local changes to affected paths |
|
126 | looking for local changes to affected paths | |
127 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
127 | The following changeset(s) or their ancestors have local changes not on the remote: | |
128 | * (glob) |
|
128 | * (glob) | |
129 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) |
|
129 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) | |
130 | deleting data/d0/f.i |
|
130 | deleting data/d0/f.i (reporevlogstore !) | |
|
131 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) | |||
|
132 | deleting data/d0/f/4374b5650fc5ae54ac857c0f0381971fdde376f7 (reposimplestore !) | |||
|
133 | deleting data/d0/f/index (reposimplestore !) | |||
131 | deleting meta/d0/00manifest.i (tree !) |
|
134 | deleting meta/d0/00manifest.i (tree !) | |
|
135 | ||||
132 | $ hg log -T "{node|short}: {desc} {outsidenarrow}\n" |
|
136 | $ hg log -T "{node|short}: {desc} {outsidenarrow}\n" | |
133 | *: local change to d3 (glob) |
|
137 | *: local change to d3 (glob) | |
134 | *: add d10/f outsidenarrow (glob) |
|
138 | *: add d10/f outsidenarrow (glob) | |
135 | *: add d6/f (glob) |
|
139 | *: add d6/f (glob) | |
136 | *: add d5/f outsidenarrow (glob) |
|
140 | *: add d5/f outsidenarrow (glob) | |
137 | *: add d3/f (glob) |
|
141 | *: add d3/f (glob) | |
138 | *: add d2/f outsidenarrow (glob) |
|
142 | *: add d2/f outsidenarrow (glob) | |
139 | *: add d0/f outsidenarrow (glob) |
|
143 | *: add d0/f outsidenarrow (glob) | |
140 | Can restore stripped local changes after widening |
|
144 | Can restore stripped local changes after widening | |
141 | $ hg tracked --addinclude d0 -q |
|
145 | $ hg tracked --addinclude d0 -q | |
142 | $ hg unbundle .hg/strip-backup/*-narrow.hg -q |
|
146 | $ hg unbundle .hg/strip-backup/*-narrow.hg -q | |
143 | $ hg --hidden co -r 'desc("local change to d0")' -q |
|
147 | $ hg --hidden co -r 'desc("local change to d0")' -q | |
144 | $ cat d0/f |
|
148 | $ cat d0/f | |
145 | 0 |
|
149 | 0 | |
146 | local change |
|
150 | local change | |
147 | Pruned commits affecting removed paths should not prevent narrowing |
|
151 | Pruned commits affecting removed paths should not prevent narrowing | |
148 | $ hg co '.^' |
|
152 | $ hg co '.^' | |
149 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
153 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
150 | $ hg debugobsolete `hg log -T '{node}' -r 'desc("local change to d0")'` |
|
154 | $ hg debugobsolete `hg log -T '{node}' -r 'desc("local change to d0")'` | |
151 | obsoleted 1 changesets |
|
155 | obsoleted 1 changesets | |
152 | $ hg tracked --removeinclude d0 |
|
156 | $ hg tracked --removeinclude d0 | |
153 | comparing with ssh://user@dummy/master |
|
157 | comparing with ssh://user@dummy/master | |
154 | searching for changes |
|
158 | searching for changes | |
155 | looking for local changes to affected paths |
|
159 | looking for local changes to affected paths | |
156 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) |
|
160 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) | |
157 | deleting data/d0/f.i |
|
161 | deleting data/d0/f.i (reporevlogstore !) | |
|
162 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) | |||
|
163 | deleting data/d0/f/4374b5650fc5ae54ac857c0f0381971fdde376f7 (reposimplestore !) | |||
|
164 | deleting data/d0/f/index (reposimplestore !) | |||
158 | deleting meta/d0/00manifest.i (tree !) |
|
165 | deleting meta/d0/00manifest.i (tree !) | |
|
166 | ||||
159 | Updates off of stripped commit if necessary |
|
167 | Updates off of stripped commit if necessary | |
160 | $ hg co -r 'desc("local change to d3")' -q |
|
168 | $ hg co -r 'desc("local change to d3")' -q | |
161 | $ echo local change >> d6/f |
|
169 | $ echo local change >> d6/f | |
162 | $ hg ci -m 'local change to d6' |
|
170 | $ hg ci -m 'local change to d6' | |
163 | $ hg tracked --removeinclude d3 --force-delete-local-changes |
|
171 | $ hg tracked --removeinclude d3 --force-delete-local-changes | |
164 | comparing with ssh://user@dummy/master |
|
172 | comparing with ssh://user@dummy/master | |
165 | searching for changes |
|
173 | searching for changes | |
166 | looking for local changes to affected paths |
|
174 | looking for local changes to affected paths | |
167 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
175 | The following changeset(s) or their ancestors have local changes not on the remote: | |
168 | * (glob) |
|
176 | * (glob) | |
169 | * (glob) |
|
177 | * (glob) | |
170 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
178 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
171 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) |
|
179 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) | |
172 | deleting data/d3/f.i |
|
180 | deleting data/d3/f.i (reporevlogstore !) | |
|
181 | deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !) | |||
|
182 | deleting data/d3/f/99fa7136105a15e2045ce3d9152e4837c5349e4d (reposimplestore !) | |||
|
183 | deleting data/d3/f/index (reposimplestore !) | |||
173 | deleting meta/d3/00manifest.i (tree !) |
|
184 | deleting meta/d3/00manifest.i (tree !) | |
174 | $ hg log -T '{desc}\n' -r . |
|
185 | $ hg log -T '{desc}\n' -r . | |
175 | add d10/f |
|
186 | add d10/f | |
176 | Updates to nullid if necessary |
|
187 | Updates to nullid if necessary | |
177 | $ hg tracked --addinclude d3 -q |
|
188 | $ hg tracked --addinclude d3 -q | |
178 | $ hg co null -q |
|
189 | $ hg co null -q | |
179 | $ mkdir d3 |
|
190 | $ mkdir d3 | |
180 | $ echo local change > d3/f |
|
191 | $ echo local change > d3/f | |
181 | $ hg add d3/f |
|
192 | $ hg add d3/f | |
182 | $ hg ci -m 'local change to d3' |
|
193 | $ hg ci -m 'local change to d3' | |
183 | created new head |
|
194 | created new head | |
184 | $ hg tracked --removeinclude d3 --force-delete-local-changes |
|
195 | $ hg tracked --removeinclude d3 --force-delete-local-changes | |
185 | comparing with ssh://user@dummy/master |
|
196 | comparing with ssh://user@dummy/master | |
186 | searching for changes |
|
197 | searching for changes | |
187 | looking for local changes to affected paths |
|
198 | looking for local changes to affected paths | |
188 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
199 | The following changeset(s) or their ancestors have local changes not on the remote: | |
189 | * (glob) |
|
200 | * (glob) | |
190 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
201 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
191 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) |
|
202 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) | |
192 | deleting data/d3/f.i |
|
203 | deleting data/d3/f.i (reporevlogstore !) | |
|
204 | deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !) | |||
|
205 | deleting data/d3/f/5ce0767945cbdbca3b924bb9fbf5143f72ab40ac (reposimplestore !) | |||
|
206 | deleting data/d3/f/index (reposimplestore !) | |||
193 | deleting meta/d3/00manifest.i (tree !) |
|
207 | deleting meta/d3/00manifest.i (tree !) | |
194 | $ hg id |
|
208 | $ hg id | |
195 | 000000000000 |
|
209 | 000000000000 | |
196 | $ cd .. |
|
210 | $ cd .. | |
197 |
|
211 | |||
198 | Can remove last include, making repo empty |
|
212 | Can remove last include, making repo empty | |
199 | $ hg clone --narrow ssh://user@dummy/master narrow-empty --include d0 -r 5 |
|
213 | $ hg clone --narrow ssh://user@dummy/master narrow-empty --include d0 -r 5 | |
200 | adding changesets |
|
214 | adding changesets | |
201 | adding manifests |
|
215 | adding manifests | |
202 | adding file changes |
|
216 | adding file changes | |
203 | added 2 changesets with 1 changes to 1 files |
|
217 | added 2 changesets with 1 changes to 1 files | |
204 | new changesets *:* (glob) |
|
218 | new changesets *:* (glob) | |
205 | updating to branch default |
|
219 | updating to branch default | |
206 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
220 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
207 | $ cd narrow-empty |
|
221 | $ cd narrow-empty | |
208 | $ hg tracked --removeinclude d0 |
|
222 | $ hg tracked --removeinclude d0 | |
209 | comparing with ssh://user@dummy/master |
|
223 | comparing with ssh://user@dummy/master | |
210 | searching for changes |
|
224 | searching for changes | |
211 | looking for local changes to affected paths |
|
225 | looking for local changes to affected paths | |
212 | deleting data/d0/f.i |
|
226 | deleting data/d0/f.i (reporevlogstore !) | |
|
227 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) | |||
|
228 | deleting data/d0/f/index (reposimplestore !) | |||
213 | deleting meta/d0/00manifest.i (tree !) |
|
229 | deleting meta/d0/00manifest.i (tree !) | |
214 | $ hg tracked |
|
230 | $ hg tracked | |
215 | $ hg files |
|
231 | $ hg files | |
216 | [1] |
|
232 | [1] | |
217 | $ test -d d0 |
|
233 | $ test -d d0 | |
218 | [1] |
|
234 | [1] | |
219 | Do some work in the empty clone |
|
235 | Do some work in the empty clone | |
220 | $ hg diff --change . |
|
236 | $ hg diff --change . | |
221 | $ hg branch foo |
|
237 | $ hg branch foo | |
222 | marked working directory as branch foo |
|
238 | marked working directory as branch foo | |
223 | (branches are permanent and global, did you want a bookmark?) |
|
239 | (branches are permanent and global, did you want a bookmark?) | |
224 | $ hg ci -m empty |
|
240 | $ hg ci -m empty | |
225 | $ hg pull -q |
|
241 | $ hg pull -q | |
226 | Can widen the empty clone |
|
242 | Can widen the empty clone | |
227 | $ hg tracked --addinclude d0 |
|
243 | $ hg tracked --addinclude d0 | |
228 | comparing with ssh://user@dummy/master |
|
244 | comparing with ssh://user@dummy/master | |
229 | searching for changes |
|
245 | searching for changes | |
230 | no changes found |
|
246 | no changes found | |
231 | saved backup bundle to $TESTTMP/narrow-empty/.hg/strip-backup/*-widen.hg (glob) |
|
247 | saved backup bundle to $TESTTMP/narrow-empty/.hg/strip-backup/*-widen.hg (glob) | |
232 | adding changesets |
|
248 | adding changesets | |
233 | adding manifests |
|
249 | adding manifests | |
234 | adding file changes |
|
250 | adding file changes | |
235 | added 3 changesets with 1 changes to 1 files |
|
251 | added 3 changesets with 1 changes to 1 files | |
236 | new changesets *:* (glob) |
|
252 | new changesets *:* (glob) | |
237 | $ hg tracked |
|
253 | $ hg tracked | |
238 | I path:d0 |
|
254 | I path:d0 | |
239 | $ hg files |
|
255 | $ hg files | |
240 | d0/f |
|
256 | d0/f | |
241 | $ find * |
|
257 | $ find * | |
242 | d0 |
|
258 | d0 | |
243 | d0/f |
|
259 | d0/f | |
244 | $ cd .. |
|
260 | $ cd .. | |
245 |
|
261 | |||
246 | TODO(martinvonz): test including e.g. d3/g and then removing it once |
|
262 | TODO(martinvonz): test including e.g. d3/g and then removing it once | |
247 | https://bitbucket.org/Google/narrowhg/issues/6 is fixed |
|
263 | https://bitbucket.org/Google/narrowhg/issues/6 is fixed | |
248 |
|
264 | |||
249 | $ hg clone --narrow ssh://user@dummy/master narrow --include d0 --include d3 --include d6 --include d9 |
|
265 | $ hg clone --narrow ssh://user@dummy/master narrow --include d0 --include d3 --include d6 --include d9 | |
250 | requesting all changes |
|
266 | requesting all changes | |
251 | adding changesets |
|
267 | adding changesets | |
252 | adding manifests |
|
268 | adding manifests | |
253 | adding file changes |
|
269 | adding file changes | |
254 | added 8 changesets with 4 changes to 4 files |
|
270 | added 8 changesets with 4 changes to 4 files | |
255 | new changesets *:* (glob) |
|
271 | new changesets *:* (glob) | |
256 | updating to branch default |
|
272 | updating to branch default | |
257 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
273 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
258 | $ cd narrow |
|
274 | $ cd narrow | |
259 | $ hg tracked |
|
275 | $ hg tracked | |
260 | I path:d0 |
|
276 | I path:d0 | |
261 | I path:d3 |
|
277 | I path:d3 | |
262 | I path:d6 |
|
278 | I path:d6 | |
263 | I path:d9 |
|
279 | I path:d9 | |
264 | $ hg tracked --removeinclude d6 |
|
280 | $ hg tracked --removeinclude d6 | |
265 | comparing with ssh://user@dummy/master |
|
281 | comparing with ssh://user@dummy/master | |
266 | searching for changes |
|
282 | searching for changes | |
267 | looking for local changes to affected paths |
|
283 | looking for local changes to affected paths | |
268 | deleting data/d6/f.i |
|
284 | deleting data/d6/f.i (reporevlogstore !) | |
|
285 | deleting data/d6/f/7339d30678f451ac8c3f38753beeb4cf2e1655c7 (reposimplestore !) | |||
|
286 | deleting data/d6/f/index (reposimplestore !) | |||
269 | deleting meta/d6/00manifest.i (tree !) |
|
287 | deleting meta/d6/00manifest.i (tree !) | |
270 | $ hg tracked |
|
288 | $ hg tracked | |
271 | I path:d0 |
|
289 | I path:d0 | |
272 | I path:d3 |
|
290 | I path:d3 | |
273 | I path:d9 |
|
291 | I path:d9 | |
274 | $ hg debugrebuildfncache |
|
292 | $ hg debugrebuildfncache | |
275 | fncache already up to date |
|
293 | fncache already up to date | |
276 | $ find * |
|
294 | $ find * | |
277 | d0 |
|
295 | d0 | |
278 | d0/f |
|
296 | d0/f | |
279 | d3 |
|
297 | d3 | |
280 | d3/f |
|
298 | d3/f | |
281 | d9 |
|
299 | d9 | |
282 | d9/f |
|
300 | d9/f | |
283 | $ hg verify -q |
|
301 | $ hg verify -q | |
284 | $ hg tracked --addexclude d3/f |
|
302 | $ hg tracked --addexclude d3/f | |
285 | comparing with ssh://user@dummy/master |
|
303 | comparing with ssh://user@dummy/master | |
286 | searching for changes |
|
304 | searching for changes | |
287 | looking for local changes to affected paths |
|
305 | looking for local changes to affected paths | |
288 | deleting data/d3/f.i |
|
306 | deleting data/d3/f.i (reporevlogstore !) | |
289 | $ hg tracked |
|
307 | $ hg tracked | |
290 | I path:d0 |
|
308 | I path:d0 | |
291 | I path:d3 |
|
309 | I path:d3 | |
292 | I path:d9 |
|
310 | I path:d9 | |
293 | X path:d3/f |
|
311 | X path:d3/f | |
294 | $ hg debugrebuildfncache |
|
312 | $ hg debugrebuildfncache | |
295 | fncache already up to date |
|
313 | fncache already up to date | |
296 | $ find * |
|
314 | $ find * | |
297 | d0 |
|
315 | d0 | |
298 | d0/f |
|
316 | d0/f | |
299 | d9 |
|
317 | d9 | |
300 | d9/f |
|
318 | d9/f | |
301 | $ hg verify -q |
|
319 | $ hg verify -q | |
302 | $ hg tracked --addexclude d0 |
|
320 | $ hg tracked --addexclude d0 | |
303 | comparing with ssh://user@dummy/master |
|
321 | comparing with ssh://user@dummy/master | |
304 | searching for changes |
|
322 | searching for changes | |
305 | looking for local changes to affected paths |
|
323 | looking for local changes to affected paths | |
306 | deleting data/d0/f.i |
|
324 | deleting data/d0/f.i (reporevlogstore !) | |
307 | deleting meta/d0/00manifest.i (tree !) |
|
325 | deleting meta/d0/00manifest.i (tree !) | |
308 | $ hg tracked |
|
326 | $ hg tracked | |
309 | I path:d3 |
|
327 | I path:d3 | |
310 | I path:d9 |
|
328 | I path:d9 | |
311 | X path:d0 |
|
329 | X path:d0 | |
312 | X path:d3/f |
|
330 | X path:d3/f | |
313 | $ hg debugrebuildfncache |
|
331 | $ hg debugrebuildfncache | |
314 | fncache already up to date |
|
332 | fncache already up to date | |
315 | $ find * |
|
333 | $ find * | |
316 | d9 |
|
334 | d9 | |
317 | d9/f |
|
335 | d9/f | |
318 |
|
336 | |||
319 | Make a 15 of changes to d9 to test the path without --verbose |
|
337 | Make a 15 of changes to d9 to test the path without --verbose | |
320 | (Note: using regexes instead of "* (glob)" because if the test fails, it |
|
338 | (Note: using regexes instead of "* (glob)" because if the test fails, it | |
321 | produces more sensible diffs) |
|
339 | produces more sensible diffs) | |
322 | $ hg tracked |
|
340 | $ hg tracked | |
323 | I path:d3 |
|
341 | I path:d3 | |
324 | I path:d9 |
|
342 | I path:d9 | |
325 | X path:d0 |
|
343 | X path:d0 | |
326 | X path:d3/f |
|
344 | X path:d3/f | |
327 | $ for x in `$TESTDIR/seq.py 1 15` |
|
345 | $ for x in `$TESTDIR/seq.py 1 15` | |
328 | > do |
|
346 | > do | |
329 | > echo local change >> d9/f |
|
347 | > echo local change >> d9/f | |
330 | > hg commit -m "change $x to d9/f" |
|
348 | > hg commit -m "change $x to d9/f" | |
331 | > done |
|
349 | > done | |
332 | $ hg tracked --removeinclude d9 |
|
350 | $ hg tracked --removeinclude d9 | |
333 | comparing with ssh://user@dummy/master |
|
351 | comparing with ssh://user@dummy/master | |
334 | searching for changes |
|
352 | searching for changes | |
335 | looking for local changes to affected paths |
|
353 | looking for local changes to affected paths | |
336 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
354 | The following changeset(s) or their ancestors have local changes not on the remote: | |
337 | ^[0-9a-f]{12}$ (re) |
|
355 | ^[0-9a-f]{12}$ (re) | |
338 | ^[0-9a-f]{12}$ (re) |
|
356 | ^[0-9a-f]{12}$ (re) | |
339 | ^[0-9a-f]{12}$ (re) |
|
357 | ^[0-9a-f]{12}$ (re) | |
340 | ^[0-9a-f]{12}$ (re) |
|
358 | ^[0-9a-f]{12}$ (re) | |
341 | ^[0-9a-f]{12}$ (re) |
|
359 | ^[0-9a-f]{12}$ (re) | |
342 | ^[0-9a-f]{12}$ (re) |
|
360 | ^[0-9a-f]{12}$ (re) | |
343 | ^[0-9a-f]{12}$ (re) |
|
361 | ^[0-9a-f]{12}$ (re) | |
344 | ^[0-9a-f]{12}$ (re) |
|
362 | ^[0-9a-f]{12}$ (re) | |
345 | ^[0-9a-f]{12}$ (re) |
|
363 | ^[0-9a-f]{12}$ (re) | |
346 | ^[0-9a-f]{12}$ (re) |
|
364 | ^[0-9a-f]{12}$ (re) | |
347 | ...and 5 more, use --verbose to list all |
|
365 | ...and 5 more, use --verbose to list all | |
348 | abort: local changes found |
|
366 | abort: local changes found | |
349 | (use --force-delete-local-changes to ignore) |
|
367 | (use --force-delete-local-changes to ignore) | |
350 | [255] |
|
368 | [255] | |
351 | Now test it *with* verbose. |
|
369 | Now test it *with* verbose. | |
352 | $ hg tracked --removeinclude d9 --verbose |
|
370 | $ hg tracked --removeinclude d9 --verbose | |
353 | comparing with ssh://user@dummy/master |
|
371 | comparing with ssh://user@dummy/master | |
354 | searching for changes |
|
372 | searching for changes | |
355 | looking for local changes to affected paths |
|
373 | looking for local changes to affected paths | |
356 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
374 | The following changeset(s) or their ancestors have local changes not on the remote: | |
357 | ^[0-9a-f]{12}$ (re) |
|
375 | ^[0-9a-f]{12}$ (re) | |
358 | ^[0-9a-f]{12}$ (re) |
|
376 | ^[0-9a-f]{12}$ (re) | |
359 | ^[0-9a-f]{12}$ (re) |
|
377 | ^[0-9a-f]{12}$ (re) | |
360 | ^[0-9a-f]{12}$ (re) |
|
378 | ^[0-9a-f]{12}$ (re) | |
361 | ^[0-9a-f]{12}$ (re) |
|
379 | ^[0-9a-f]{12}$ (re) | |
362 | ^[0-9a-f]{12}$ (re) |
|
380 | ^[0-9a-f]{12}$ (re) | |
363 | ^[0-9a-f]{12}$ (re) |
|
381 | ^[0-9a-f]{12}$ (re) | |
364 | ^[0-9a-f]{12}$ (re) |
|
382 | ^[0-9a-f]{12}$ (re) | |
365 | ^[0-9a-f]{12}$ (re) |
|
383 | ^[0-9a-f]{12}$ (re) | |
366 | ^[0-9a-f]{12}$ (re) |
|
384 | ^[0-9a-f]{12}$ (re) | |
367 | ^[0-9a-f]{12}$ (re) |
|
385 | ^[0-9a-f]{12}$ (re) | |
368 | ^[0-9a-f]{12}$ (re) |
|
386 | ^[0-9a-f]{12}$ (re) | |
369 | ^[0-9a-f]{12}$ (re) |
|
387 | ^[0-9a-f]{12}$ (re) | |
370 | ^[0-9a-f]{12}$ (re) |
|
388 | ^[0-9a-f]{12}$ (re) | |
371 | ^[0-9a-f]{12}$ (re) |
|
389 | ^[0-9a-f]{12}$ (re) | |
372 | abort: local changes found |
|
390 | abort: local changes found | |
373 | (use --force-delete-local-changes to ignore) |
|
391 | (use --force-delete-local-changes to ignore) | |
374 | [255] |
|
392 | [255] |
General Comments 0
You need to be logged in to leave comments.
Login now