Show More
@@ -1,605 +1,608 b'' | |||
|
1 | 1 | Create test repository: |
|
2 | 2 | |
|
3 | 3 | $ hg init repo |
|
4 | 4 | $ cd repo |
|
5 | 5 | $ echo x1 > x.txt |
|
6 | 6 | |
|
7 | 7 | $ hg init foo |
|
8 | 8 | $ cd foo |
|
9 | 9 | $ echo y1 > y.txt |
|
10 | 10 | |
|
11 | 11 | $ hg init bar |
|
12 | 12 | $ cd bar |
|
13 | 13 | $ echo z1 > z.txt |
|
14 | 14 | |
|
15 | 15 | $ cd .. |
|
16 | 16 | $ echo 'bar = bar' > .hgsub |
|
17 | 17 | |
|
18 | 18 | $ cd .. |
|
19 | 19 | $ echo 'foo = foo' > .hgsub |
|
20 | 20 | |
|
21 | 21 | Add files --- .hgsub files must go first to trigger subrepos: |
|
22 | 22 | |
|
23 | 23 | $ hg add -S .hgsub |
|
24 | 24 | $ hg add -S foo/.hgsub |
|
25 | 25 | $ hg add -S foo/bar |
|
26 | 26 | adding foo/bar/z.txt (glob) |
|
27 | 27 | $ hg add -S |
|
28 | 28 | adding x.txt |
|
29 | 29 | adding foo/y.txt (glob) |
|
30 | 30 | |
|
31 | 31 | Test recursive status without committing anything: |
|
32 | 32 | |
|
33 | 33 | $ hg status -S |
|
34 | 34 | A .hgsub |
|
35 | 35 | A foo/.hgsub |
|
36 | 36 | A foo/bar/z.txt |
|
37 | 37 | A foo/y.txt |
|
38 | 38 | A x.txt |
|
39 | 39 | |
|
40 | 40 | Test recursive diff without committing anything: |
|
41 | 41 | |
|
42 | 42 | $ hg diff --nodates -S foo |
|
43 | 43 | diff -r 000000000000 foo/.hgsub |
|
44 | 44 | --- /dev/null |
|
45 | 45 | +++ b/foo/.hgsub |
|
46 | 46 | @@ -0,0 +1,1 @@ |
|
47 | 47 | +bar = bar |
|
48 | 48 | diff -r 000000000000 foo/y.txt |
|
49 | 49 | --- /dev/null |
|
50 | 50 | +++ b/foo/y.txt |
|
51 | 51 | @@ -0,0 +1,1 @@ |
|
52 | 52 | +y1 |
|
53 | 53 | diff -r 000000000000 foo/bar/z.txt |
|
54 | 54 | --- /dev/null |
|
55 | 55 | +++ b/foo/bar/z.txt |
|
56 | 56 | @@ -0,0 +1,1 @@ |
|
57 | 57 | +z1 |
|
58 | 58 | |
|
59 | 59 | Commits: |
|
60 | 60 | |
|
61 | 61 | $ hg commit -m fails |
|
62 | 62 | abort: uncommitted changes in subrepository 'foo' |
|
63 | 63 | (use --subrepos for recursive commit) |
|
64 | 64 | [255] |
|
65 | 65 | |
|
66 | 66 | The --subrepos flag overwrite the config setting: |
|
67 | 67 | |
|
68 | 68 | $ hg commit -m 0-0-0 --config ui.commitsubrepos=No --subrepos |
|
69 | 69 | committing subrepository foo |
|
70 | 70 | committing subrepository foo/bar (glob) |
|
71 | 71 | |
|
72 | 72 | $ cd foo |
|
73 | 73 | $ echo y2 >> y.txt |
|
74 | 74 | $ hg commit -m 0-1-0 |
|
75 | 75 | |
|
76 | 76 | $ cd bar |
|
77 | 77 | $ echo z2 >> z.txt |
|
78 | 78 | $ hg commit -m 0-1-1 |
|
79 | 79 | |
|
80 | 80 | $ cd .. |
|
81 | 81 | $ hg commit -m 0-2-1 |
|
82 | 82 | |
|
83 | 83 | $ cd .. |
|
84 | 84 | $ hg commit -m 1-2-1 |
|
85 | 85 | |
|
86 | 86 | Change working directory: |
|
87 | 87 | |
|
88 | 88 | $ echo y3 >> foo/y.txt |
|
89 | 89 | $ echo z3 >> foo/bar/z.txt |
|
90 | 90 | $ hg status -S |
|
91 | 91 | M foo/bar/z.txt |
|
92 | 92 | M foo/y.txt |
|
93 | 93 | $ hg diff --nodates -S |
|
94 | 94 | diff -r d254738c5f5e foo/y.txt |
|
95 | 95 | --- a/foo/y.txt |
|
96 | 96 | +++ b/foo/y.txt |
|
97 | 97 | @@ -1,2 +1,3 @@ |
|
98 | 98 | y1 |
|
99 | 99 | y2 |
|
100 | 100 | +y3 |
|
101 | 101 | diff -r 9647f22de499 foo/bar/z.txt |
|
102 | 102 | --- a/foo/bar/z.txt |
|
103 | 103 | +++ b/foo/bar/z.txt |
|
104 | 104 | @@ -1,2 +1,3 @@ |
|
105 | 105 | z1 |
|
106 | 106 | z2 |
|
107 | 107 | +z3 |
|
108 | 108 | |
|
109 | 109 | Status call crossing repository boundaries: |
|
110 | 110 | |
|
111 | 111 | $ hg status -S foo/bar/z.txt |
|
112 | 112 | M foo/bar/z.txt |
|
113 | 113 | $ hg status -S -I 'foo/?.txt' |
|
114 | 114 | M foo/y.txt |
|
115 | 115 | $ hg status -S -I '**/?.txt' |
|
116 | 116 | M foo/bar/z.txt |
|
117 | 117 | M foo/y.txt |
|
118 | 118 | $ hg diff --nodates -S -I '**/?.txt' |
|
119 | 119 | diff -r d254738c5f5e foo/y.txt |
|
120 | 120 | --- a/foo/y.txt |
|
121 | 121 | +++ b/foo/y.txt |
|
122 | 122 | @@ -1,2 +1,3 @@ |
|
123 | 123 | y1 |
|
124 | 124 | y2 |
|
125 | 125 | +y3 |
|
126 | 126 | diff -r 9647f22de499 foo/bar/z.txt |
|
127 | 127 | --- a/foo/bar/z.txt |
|
128 | 128 | +++ b/foo/bar/z.txt |
|
129 | 129 | @@ -1,2 +1,3 @@ |
|
130 | 130 | z1 |
|
131 | 131 | z2 |
|
132 | 132 | +z3 |
|
133 | 133 | |
|
134 | 134 | Status from within a subdirectory: |
|
135 | 135 | |
|
136 | 136 | $ mkdir dir |
|
137 | 137 | $ cd dir |
|
138 | 138 | $ echo a1 > a.txt |
|
139 | 139 | $ hg status -S |
|
140 | 140 | M foo/bar/z.txt |
|
141 | 141 | M foo/y.txt |
|
142 | 142 | ? dir/a.txt |
|
143 | 143 | $ hg diff --nodates -S |
|
144 | 144 | diff -r d254738c5f5e foo/y.txt |
|
145 | 145 | --- a/foo/y.txt |
|
146 | 146 | +++ b/foo/y.txt |
|
147 | 147 | @@ -1,2 +1,3 @@ |
|
148 | 148 | y1 |
|
149 | 149 | y2 |
|
150 | 150 | +y3 |
|
151 | 151 | diff -r 9647f22de499 foo/bar/z.txt |
|
152 | 152 | --- a/foo/bar/z.txt |
|
153 | 153 | +++ b/foo/bar/z.txt |
|
154 | 154 | @@ -1,2 +1,3 @@ |
|
155 | 155 | z1 |
|
156 | 156 | z2 |
|
157 | 157 | +z3 |
|
158 | 158 | |
|
159 | 159 | Status with relative path: |
|
160 | 160 | |
|
161 | 161 | $ hg status -S .. |
|
162 | 162 | M ../foo/bar/z.txt |
|
163 | 163 | M ../foo/y.txt |
|
164 | 164 | ? a.txt |
|
165 | 165 | |
|
166 | 166 | XXX: filtering lfilesrepo.status() in 3.3-rc causes these files to be listed as |
|
167 | 167 | added instead of modified. |
|
168 | 168 | $ hg status -S .. --config extensions.largefiles= |
|
169 | 169 | M ../foo/bar/z.txt |
|
170 | 170 | M ../foo/y.txt |
|
171 | 171 | ? a.txt |
|
172 | 172 | |
|
173 | 173 | $ hg diff --nodates -S .. |
|
174 | 174 | diff -r d254738c5f5e foo/y.txt |
|
175 | 175 | --- a/foo/y.txt |
|
176 | 176 | +++ b/foo/y.txt |
|
177 | 177 | @@ -1,2 +1,3 @@ |
|
178 | 178 | y1 |
|
179 | 179 | y2 |
|
180 | 180 | +y3 |
|
181 | 181 | diff -r 9647f22de499 foo/bar/z.txt |
|
182 | 182 | --- a/foo/bar/z.txt |
|
183 | 183 | +++ b/foo/bar/z.txt |
|
184 | 184 | @@ -1,2 +1,3 @@ |
|
185 | 185 | z1 |
|
186 | 186 | z2 |
|
187 | 187 | +z3 |
|
188 | 188 | $ cd .. |
|
189 | 189 | |
|
190 | 190 | Cleanup and final commit: |
|
191 | 191 | |
|
192 | 192 | $ rm -r dir |
|
193 | 193 | $ hg commit --subrepos -m 2-3-2 |
|
194 | 194 | committing subrepository foo |
|
195 | 195 | committing subrepository foo/bar (glob) |
|
196 | 196 | |
|
197 | 197 | Test explicit path commands within subrepos: add/forget |
|
198 | 198 | $ echo z1 > foo/bar/z2.txt |
|
199 | 199 | $ hg status -S |
|
200 | 200 | ? foo/bar/z2.txt |
|
201 | 201 | $ hg add foo/bar/z2.txt |
|
202 | 202 | $ hg status -S |
|
203 | 203 | A foo/bar/z2.txt |
|
204 | 204 | $ hg forget foo/bar/z2.txt |
|
205 | 205 | $ hg status -S |
|
206 | 206 | ? foo/bar/z2.txt |
|
207 | 207 | $ hg forget foo/bar/z2.txt |
|
208 | 208 | not removing foo/bar/z2.txt: file is already untracked (glob) |
|
209 | 209 | [1] |
|
210 | 210 | $ hg status -S |
|
211 | 211 | ? foo/bar/z2.txt |
|
212 | 212 | $ rm foo/bar/z2.txt |
|
213 | 213 | |
|
214 | 214 | Log with the relationships between repo and its subrepo: |
|
215 | 215 | |
|
216 | 216 | $ hg log --template '{rev}:{node|short} {desc}\n' |
|
217 | 217 | 2:1326fa26d0c0 2-3-2 |
|
218 | 218 | 1:4b3c9ff4f66b 1-2-1 |
|
219 | 219 | 0:23376cbba0d8 0-0-0 |
|
220 | 220 | |
|
221 | 221 | $ hg -R foo log --template '{rev}:{node|short} {desc}\n' |
|
222 | 222 | 3:65903cebad86 2-3-2 |
|
223 | 223 | 2:d254738c5f5e 0-2-1 |
|
224 | 224 | 1:8629ce7dcc39 0-1-0 |
|
225 | 225 | 0:af048e97ade2 0-0-0 |
|
226 | 226 | |
|
227 | 227 | $ hg -R foo/bar log --template '{rev}:{node|short} {desc}\n' |
|
228 | 228 | 2:31ecbdafd357 2-3-2 |
|
229 | 229 | 1:9647f22de499 0-1-1 |
|
230 | 230 | 0:4904098473f9 0-0-0 |
|
231 | 231 | |
|
232 | 232 | Status between revisions: |
|
233 | 233 | |
|
234 | 234 | $ hg status -S |
|
235 | 235 | $ hg status -S --rev 0:1 |
|
236 | 236 | M .hgsubstate |
|
237 | 237 | M foo/.hgsubstate |
|
238 | 238 | M foo/bar/z.txt |
|
239 | 239 | M foo/y.txt |
|
240 | 240 | $ hg diff --nodates -S -I '**/?.txt' --rev 0:1 |
|
241 | 241 | diff -r af048e97ade2 -r d254738c5f5e foo/y.txt |
|
242 | 242 | --- a/foo/y.txt |
|
243 | 243 | +++ b/foo/y.txt |
|
244 | 244 | @@ -1,1 +1,2 @@ |
|
245 | 245 | y1 |
|
246 | 246 | +y2 |
|
247 | 247 | diff -r 4904098473f9 -r 9647f22de499 foo/bar/z.txt |
|
248 | 248 | --- a/foo/bar/z.txt |
|
249 | 249 | +++ b/foo/bar/z.txt |
|
250 | 250 | @@ -1,1 +1,2 @@ |
|
251 | 251 | z1 |
|
252 | 252 | +z2 |
|
253 | 253 | |
|
254 | 254 | Enable progress extension for archive tests: |
|
255 | 255 | |
|
256 | 256 | $ cp $HGRCPATH $HGRCPATH.no-progress |
|
257 | 257 | $ cat >> $HGRCPATH <<EOF |
|
258 | 258 | > [extensions] |
|
259 | 259 | > progress = |
|
260 | 260 | > [progress] |
|
261 | 261 | > assume-tty = 1 |
|
262 | 262 | > delay = 0 |
|
263 | 263 | > # set changedelay really large so we don't see nested topics |
|
264 | 264 | > changedelay = 30000 |
|
265 | 265 | > format = topic bar number |
|
266 | 266 | > refresh = 0 |
|
267 | 267 | > width = 60 |
|
268 | 268 | > EOF |
|
269 | 269 | |
|
270 | 270 | Test archiving to a directory tree (the doubled lines in the output |
|
271 | 271 | only show up in the test output, not in real usage): |
|
272 | 272 | |
|
273 | 273 | $ hg archive --subrepos ../archive |
|
274 | 274 | \r (no-eol) (esc) |
|
275 | 275 | archiving [ ] 0/3\r (no-eol) (esc) |
|
276 | 276 | archiving [ ] 0/3\r (no-eol) (esc) |
|
277 | 277 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
278 | 278 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
279 | 279 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
280 | 280 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
281 | 281 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
282 | 282 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
283 | 283 | \r (no-eol) (esc) |
|
284 | 284 | \r (no-eol) (esc) |
|
285 | 285 | archiving (foo) [ ] 0/3\r (no-eol) (esc) |
|
286 | 286 | archiving (foo) [ ] 0/3\r (no-eol) (esc) |
|
287 | 287 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) |
|
288 | 288 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) |
|
289 | 289 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) |
|
290 | 290 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) |
|
291 | 291 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) |
|
292 | 292 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) |
|
293 | 293 | \r (no-eol) (esc) |
|
294 | 294 | \r (no-eol) (esc) |
|
295 | 295 | archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc) |
|
296 | 296 | archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc) |
|
297 | 297 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc) |
|
298 | 298 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc) |
|
299 | 299 | \r (no-eol) (esc) |
|
300 | 300 | $ find ../archive | sort |
|
301 | 301 | ../archive |
|
302 | 302 | ../archive/.hg_archival.txt |
|
303 | 303 | ../archive/.hgsub |
|
304 | 304 | ../archive/.hgsubstate |
|
305 | 305 | ../archive/foo |
|
306 | 306 | ../archive/foo/.hgsub |
|
307 | 307 | ../archive/foo/.hgsubstate |
|
308 | 308 | ../archive/foo/bar |
|
309 | 309 | ../archive/foo/bar/z.txt |
|
310 | 310 | ../archive/foo/y.txt |
|
311 | 311 | ../archive/x.txt |
|
312 | 312 | |
|
313 | 313 | Test archiving to zip file (unzip output is unstable): |
|
314 | 314 | |
|
315 | 315 | $ hg archive --subrepos --prefix '.' ../archive.zip |
|
316 | 316 | \r (no-eol) (esc) |
|
317 | 317 | archiving [ ] 0/3\r (no-eol) (esc) |
|
318 | 318 | archiving [ ] 0/3\r (no-eol) (esc) |
|
319 | 319 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
320 | 320 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
321 | 321 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
322 | 322 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
323 | 323 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
324 | 324 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
325 | 325 | \r (no-eol) (esc) |
|
326 | 326 | \r (no-eol) (esc) |
|
327 | 327 | archiving (foo) [ ] 0/3\r (no-eol) (esc) |
|
328 | 328 | archiving (foo) [ ] 0/3\r (no-eol) (esc) |
|
329 | 329 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) |
|
330 | 330 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) |
|
331 | 331 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) |
|
332 | 332 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) |
|
333 | 333 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) |
|
334 | 334 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) |
|
335 | 335 | \r (no-eol) (esc) |
|
336 | 336 | \r (no-eol) (esc) |
|
337 | 337 | archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc) |
|
338 | 338 | archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc) |
|
339 | 339 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc) |
|
340 | 340 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc) |
|
341 | 341 | \r (no-eol) (esc) |
|
342 | ||
|
343 | (unzip date formating is unstable, we do not care about it and glob it out) | |
|
344 | ||
|
342 | 345 | $ unzip -l ../archive.zip |
|
343 | 346 | Archive: ../archive.zip |
|
344 | 347 | Length Date Time Name |
|
345 | 348 | --------- ---------- ----- ---- |
|
346 |
172 |
|
|
347 |
10 |
|
|
348 |
45 |
|
|
349 |
3 |
|
|
350 |
10 |
|
|
351 |
45 |
|
|
352 |
9 |
|
|
353 |
9 |
|
|
349 | 172 ?????????? 00:00 .hg_archival.txt (glob) | |
|
350 | 10 ?????????? 00:00 .hgsub (glob) | |
|
351 | 45 ?????????? 00:00 .hgsubstate (glob) | |
|
352 | 3 ?????????? 00:00 x.txt (glob) | |
|
353 | 10 ?????????? 00:00 foo/.hgsub (glob) | |
|
354 | 45 ?????????? 00:00 foo/.hgsubstate (glob) | |
|
355 | 9 ?????????? 00:00 foo/y.txt (glob) | |
|
356 | 9 ?????????? 00:00 foo/bar/z.txt (glob) | |
|
354 | 357 | --------- ------- |
|
355 | 358 | 303 8 files |
|
356 | 359 | |
|
357 | 360 | Test archiving a revision that references a subrepo that is not yet |
|
358 | 361 | cloned: |
|
359 | 362 | |
|
360 | 363 | #if hardlink |
|
361 | 364 | $ hg clone -U . ../empty |
|
362 | 365 | \r (no-eol) (esc) |
|
363 | 366 | linking [ <=> ] 1\r (no-eol) (esc) |
|
364 | 367 | linking [ <=> ] 2\r (no-eol) (esc) |
|
365 | 368 | linking [ <=> ] 3\r (no-eol) (esc) |
|
366 | 369 | linking [ <=> ] 4\r (no-eol) (esc) |
|
367 | 370 | linking [ <=> ] 5\r (no-eol) (esc) |
|
368 | 371 | linking [ <=> ] 6\r (no-eol) (esc) |
|
369 | 372 | linking [ <=> ] 7\r (no-eol) (esc) |
|
370 | 373 | linking [ <=> ] 8\r (no-eol) (esc) |
|
371 | 374 | \r (no-eol) (esc) |
|
372 | 375 | #else |
|
373 | 376 | $ hg clone -U . ../empty |
|
374 | 377 | \r (no-eol) (esc) |
|
375 | 378 | linking [ <=> ] 1 (no-eol) |
|
376 | 379 | #endif |
|
377 | 380 | |
|
378 | 381 | $ cd ../empty |
|
379 | 382 | #if hardlink |
|
380 | 383 | $ hg archive --subrepos -r tip --prefix './' ../archive.tar.gz |
|
381 | 384 | \r (no-eol) (esc) |
|
382 | 385 | archiving [ ] 0/3\r (no-eol) (esc) |
|
383 | 386 | archiving [ ] 0/3\r (no-eol) (esc) |
|
384 | 387 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
385 | 388 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
386 | 389 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
387 | 390 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
388 | 391 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
389 | 392 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
390 | 393 | \r (no-eol) (esc) |
|
391 | 394 | \r (no-eol) (esc) |
|
392 | 395 | linking [ <=> ] 1\r (no-eol) (esc) |
|
393 | 396 | linking [ <=> ] 2\r (no-eol) (esc) |
|
394 | 397 | linking [ <=> ] 3\r (no-eol) (esc) |
|
395 | 398 | linking [ <=> ] 4\r (no-eol) (esc) |
|
396 | 399 | linking [ <=> ] 5\r (no-eol) (esc) |
|
397 | 400 | linking [ <=> ] 6\r (no-eol) (esc) |
|
398 | 401 | linking [ <=> ] 7\r (no-eol) (esc) |
|
399 | 402 | linking [ <=> ] 8\r (no-eol) (esc) |
|
400 | 403 | \r (no-eol) (esc) |
|
401 | 404 | \r (no-eol) (esc) |
|
402 | 405 | archiving (foo) [ ] 0/3\r (no-eol) (esc) |
|
403 | 406 | archiving (foo) [ ] 0/3\r (no-eol) (esc) |
|
404 | 407 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) |
|
405 | 408 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) |
|
406 | 409 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) |
|
407 | 410 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) |
|
408 | 411 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) |
|
409 | 412 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) |
|
410 | 413 | \r (no-eol) (esc) |
|
411 | 414 | \r (no-eol) (esc) |
|
412 | 415 | linking [ <=> ] 1\r (no-eol) (esc) |
|
413 | 416 | linking [ <=> ] 2\r (no-eol) (esc) |
|
414 | 417 | linking [ <=> ] 3\r (no-eol) (esc) |
|
415 | 418 | linking [ <=> ] 4\r (no-eol) (esc) |
|
416 | 419 | linking [ <=> ] 5\r (no-eol) (esc) |
|
417 | 420 | linking [ <=> ] 6\r (no-eol) (esc) |
|
418 | 421 | \r (no-eol) (esc) |
|
419 | 422 | \r (no-eol) (esc) |
|
420 | 423 | archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc) |
|
421 | 424 | archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc) |
|
422 | 425 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc) |
|
423 | 426 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc) |
|
424 | 427 | \r (no-eol) (esc) |
|
425 | 428 | cloning subrepo foo from $TESTTMP/repo/foo |
|
426 | 429 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob) |
|
427 | 430 | #else |
|
428 | 431 | Note there's a slight output glitch on non-hardlink systems: the last |
|
429 | 432 | "linking" progress topic never gets closed, leading to slight output corruption on that platform. |
|
430 | 433 | $ hg archive --subrepos -r tip --prefix './' ../archive.tar.gz |
|
431 | 434 | \r (no-eol) (esc) |
|
432 | 435 | archiving [ ] 0/3\r (no-eol) (esc) |
|
433 | 436 | archiving [ ] 0/3\r (no-eol) (esc) |
|
434 | 437 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
435 | 438 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
436 | 439 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
437 | 440 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
438 | 441 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
439 | 442 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
440 | 443 | \r (no-eol) (esc) |
|
441 | 444 | \r (no-eol) (esc) |
|
442 | 445 | linking [ <=> ] 1\r (no-eol) (esc) |
|
443 | 446 | \r (no-eol) (esc) |
|
444 | 447 | \r (no-eol) (esc) |
|
445 | 448 | \r (no-eol) (esc) |
|
446 | 449 | \r (no-eol) (esc) |
|
447 | 450 | linking [ <=> ] 1cloning subrepo foo from $TESTTMP/repo/foo |
|
448 | 451 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob) |
|
449 | 452 | #endif |
|
450 | 453 | |
|
451 | 454 | Archive + subrepos uses '/' for all component separators |
|
452 | 455 | |
|
453 | 456 | $ tar -tzf ../archive.tar.gz | sort |
|
454 | 457 | .hg_archival.txt |
|
455 | 458 | .hgsub |
|
456 | 459 | .hgsubstate |
|
457 | 460 | foo/.hgsub |
|
458 | 461 | foo/.hgsubstate |
|
459 | 462 | foo/bar/z.txt |
|
460 | 463 | foo/y.txt |
|
461 | 464 | x.txt |
|
462 | 465 | |
|
463 | 466 | The newly cloned subrepos contain no working copy: |
|
464 | 467 | |
|
465 | 468 | $ hg -R foo summary |
|
466 | 469 | parent: -1:000000000000 (no revision checked out) |
|
467 | 470 | branch: default |
|
468 | 471 | commit: (clean) |
|
469 | 472 | update: 4 new changesets (update) |
|
470 | 473 | |
|
471 | 474 | Disable progress extension and cleanup: |
|
472 | 475 | |
|
473 | 476 | $ mv $HGRCPATH.no-progress $HGRCPATH |
|
474 | 477 | |
|
475 | 478 | Test archiving when there is a directory in the way for a subrepo |
|
476 | 479 | created by archive: |
|
477 | 480 | |
|
478 | 481 | $ hg clone -U . ../almost-empty |
|
479 | 482 | $ cd ../almost-empty |
|
480 | 483 | $ mkdir foo |
|
481 | 484 | $ echo f > foo/f |
|
482 | 485 | $ hg archive --subrepos -r tip archive |
|
483 | 486 | cloning subrepo foo from $TESTTMP/empty/foo |
|
484 | 487 | abort: destination '$TESTTMP/almost-empty/foo' is not empty (in subrepo foo) (glob) |
|
485 | 488 | [255] |
|
486 | 489 | |
|
487 | 490 | Clone and test outgoing: |
|
488 | 491 | |
|
489 | 492 | $ cd .. |
|
490 | 493 | $ hg clone repo repo2 |
|
491 | 494 | updating to branch default |
|
492 | 495 | cloning subrepo foo from $TESTTMP/repo/foo |
|
493 | 496 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob) |
|
494 | 497 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
495 | 498 | $ cd repo2 |
|
496 | 499 | $ hg outgoing -S |
|
497 | 500 | comparing with $TESTTMP/repo (glob) |
|
498 | 501 | searching for changes |
|
499 | 502 | no changes found |
|
500 | 503 | comparing with $TESTTMP/repo/foo |
|
501 | 504 | searching for changes |
|
502 | 505 | no changes found |
|
503 | 506 | comparing with $TESTTMP/repo/foo/bar |
|
504 | 507 | searching for changes |
|
505 | 508 | no changes found |
|
506 | 509 | [1] |
|
507 | 510 | |
|
508 | 511 | Make nested change: |
|
509 | 512 | |
|
510 | 513 | $ echo y4 >> foo/y.txt |
|
511 | 514 | $ hg diff --nodates -S |
|
512 | 515 | diff -r 65903cebad86 foo/y.txt |
|
513 | 516 | --- a/foo/y.txt |
|
514 | 517 | +++ b/foo/y.txt |
|
515 | 518 | @@ -1,3 +1,4 @@ |
|
516 | 519 | y1 |
|
517 | 520 | y2 |
|
518 | 521 | y3 |
|
519 | 522 | +y4 |
|
520 | 523 | $ hg commit --subrepos -m 3-4-2 |
|
521 | 524 | committing subrepository foo |
|
522 | 525 | $ hg outgoing -S |
|
523 | 526 | comparing with $TESTTMP/repo (glob) |
|
524 | 527 | searching for changes |
|
525 | 528 | changeset: 3:2655b8ecc4ee |
|
526 | 529 | tag: tip |
|
527 | 530 | user: test |
|
528 | 531 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
529 | 532 | summary: 3-4-2 |
|
530 | 533 | |
|
531 | 534 | comparing with $TESTTMP/repo/foo |
|
532 | 535 | searching for changes |
|
533 | 536 | changeset: 4:e96193d6cb36 |
|
534 | 537 | tag: tip |
|
535 | 538 | user: test |
|
536 | 539 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
537 | 540 | summary: 3-4-2 |
|
538 | 541 | |
|
539 | 542 | comparing with $TESTTMP/repo/foo/bar |
|
540 | 543 | searching for changes |
|
541 | 544 | no changes found |
|
542 | 545 | |
|
543 | 546 | |
|
544 | 547 | Switch to original repo and setup default path: |
|
545 | 548 | |
|
546 | 549 | $ cd ../repo |
|
547 | 550 | $ echo '[paths]' >> .hg/hgrc |
|
548 | 551 | $ echo 'default = ../repo2' >> .hg/hgrc |
|
549 | 552 | |
|
550 | 553 | Test incoming: |
|
551 | 554 | |
|
552 | 555 | $ hg incoming -S |
|
553 | 556 | comparing with $TESTTMP/repo2 (glob) |
|
554 | 557 | searching for changes |
|
555 | 558 | changeset: 3:2655b8ecc4ee |
|
556 | 559 | tag: tip |
|
557 | 560 | user: test |
|
558 | 561 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
559 | 562 | summary: 3-4-2 |
|
560 | 563 | |
|
561 | 564 | comparing with $TESTTMP/repo2/foo |
|
562 | 565 | searching for changes |
|
563 | 566 | changeset: 4:e96193d6cb36 |
|
564 | 567 | tag: tip |
|
565 | 568 | user: test |
|
566 | 569 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
567 | 570 | summary: 3-4-2 |
|
568 | 571 | |
|
569 | 572 | comparing with $TESTTMP/repo2/foo/bar |
|
570 | 573 | searching for changes |
|
571 | 574 | no changes found |
|
572 | 575 | |
|
573 | 576 | $ hg incoming -S --bundle incoming.hg |
|
574 | 577 | abort: cannot combine --bundle and --subrepos |
|
575 | 578 | [255] |
|
576 | 579 | |
|
577 | 580 | Test missing subrepo: |
|
578 | 581 | |
|
579 | 582 | $ rm -r foo |
|
580 | 583 | $ hg status -S |
|
581 | 584 | warning: error "unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'" in subrepository "foo" |
|
582 | 585 | |
|
583 | 586 | Issue2619: IndexError: list index out of range on hg add with subrepos |
|
584 | 587 | The subrepo must sorts after the explicit filename. |
|
585 | 588 | |
|
586 | 589 | $ cd .. |
|
587 | 590 | $ hg init test |
|
588 | 591 | $ cd test |
|
589 | 592 | $ hg init x |
|
590 | 593 | $ echo abc > abc.txt |
|
591 | 594 | $ hg ci -Am "abc" |
|
592 | 595 | adding abc.txt |
|
593 | 596 | $ echo "x = x" >> .hgsub |
|
594 | 597 | $ hg add .hgsub |
|
595 | 598 | $ touch a x/a |
|
596 | 599 | $ hg add a x/a |
|
597 | 600 | |
|
598 | 601 | $ hg ci -Sm "added x" |
|
599 | 602 | committing subrepository x |
|
600 | 603 | $ echo abc > x/a |
|
601 | 604 | $ hg revert --rev '.^' "set:subrepo('glob:x*')" |
|
602 | 605 | abort: subrepository 'x' does not exist in 25ac2c9b3180! |
|
603 | 606 | [255] |
|
604 | 607 | |
|
605 | 608 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now