Show More
@@ -1,1088 +1,1088 | |||
|
1 | 1 | Let commit recurse into subrepos by default to match pre-2.0 behavior: |
|
2 | 2 | |
|
3 | 3 | $ echo "[ui]" >> $HGRCPATH |
|
4 | 4 | $ echo "commitsubrepos = Yes" >> $HGRCPATH |
|
5 | 5 | |
|
6 | 6 | $ hg init t |
|
7 | 7 | $ cd t |
|
8 | 8 | |
|
9 | 9 | first revision, no sub |
|
10 | 10 | |
|
11 | 11 | $ echo a > a |
|
12 | 12 | $ hg ci -Am0 |
|
13 | 13 | adding a |
|
14 | 14 | |
|
15 | 15 | add first sub |
|
16 | 16 | |
|
17 | 17 | $ echo s = s > .hgsub |
|
18 | 18 | $ hg add .hgsub |
|
19 | 19 | $ hg init s |
|
20 | 20 | $ echo a > s/a |
|
21 | 21 | |
|
22 | 22 | Issue2232: committing a subrepo without .hgsub |
|
23 | 23 | |
|
24 | 24 | $ hg ci -mbad s |
|
25 | 25 | abort: can't commit subrepos without .hgsub |
|
26 | 26 | [255] |
|
27 | 27 | |
|
28 | 28 | $ hg -R s ci -Ams0 |
|
29 | 29 | adding a |
|
30 | 30 | $ hg sum |
|
31 | 31 | parent: 0:f7b1eb17ad24 tip |
|
32 | 32 | 0 |
|
33 | 33 | branch: default |
|
34 | 34 | commit: 1 added, 1 subrepos |
|
35 | 35 | update: (current) |
|
36 | 36 | $ hg ci -m1 |
|
37 | 37 | |
|
38 | 38 | Revert subrepo and test subrepo fileset keyword: |
|
39 | 39 | |
|
40 | 40 | $ echo b > s/a |
|
41 | 41 | $ hg revert "set:subrepo('glob:s*')" |
|
42 | 42 | reverting subrepo s |
|
43 | 43 | reverting s/a (glob) |
|
44 | 44 | $ rm s/a.orig |
|
45 | 45 | |
|
46 | 46 | Revert subrepo with no backup. The "reverting s/a" line is gone since |
|
47 | 47 | we're really running 'hg update' in the subrepo: |
|
48 | 48 | |
|
49 | 49 | $ echo b > s/a |
|
50 | 50 | $ hg revert --no-backup s |
|
51 | 51 | reverting subrepo s |
|
52 | 52 | |
|
53 | 53 | Issue2022: update -C |
|
54 | 54 | |
|
55 | 55 | $ echo b > s/a |
|
56 | 56 | $ hg sum |
|
57 | 57 | parent: 1:7cf8cfea66e4 tip |
|
58 | 58 | 1 |
|
59 | 59 | branch: default |
|
60 | 60 | commit: 1 subrepos |
|
61 | 61 | update: (current) |
|
62 | 62 | $ hg co -C 1 |
|
63 | 63 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
64 | 64 | $ hg sum |
|
65 | 65 | parent: 1:7cf8cfea66e4 tip |
|
66 | 66 | 1 |
|
67 | 67 | branch: default |
|
68 | 68 | commit: (clean) |
|
69 | 69 | update: (current) |
|
70 | 70 | |
|
71 | 71 | commands that require a clean repo should respect subrepos |
|
72 | 72 | |
|
73 | 73 | $ echo b >> s/a |
|
74 | 74 | $ hg backout tip |
|
75 | 75 | abort: uncommitted changes in subrepo s |
|
76 | 76 | [255] |
|
77 | 77 | $ hg revert -C -R s s/a |
|
78 | 78 | |
|
79 | 79 | add sub sub |
|
80 | 80 | |
|
81 | 81 | $ echo ss = ss > s/.hgsub |
|
82 | 82 | $ hg init s/ss |
|
83 | 83 | $ echo a > s/ss/a |
|
84 | 84 | $ hg -R s add s/.hgsub |
|
85 | 85 | $ hg -R s/ss add s/ss/a |
|
86 | 86 | $ hg sum |
|
87 | 87 | parent: 1:7cf8cfea66e4 tip |
|
88 | 88 | 1 |
|
89 | 89 | branch: default |
|
90 | 90 | commit: 1 subrepos |
|
91 | 91 | update: (current) |
|
92 | 92 | $ hg ci -m2 |
|
93 | 93 | committing subrepository s |
|
94 | 94 | committing subrepository s/ss (glob) |
|
95 | 95 | $ hg sum |
|
96 | 96 | parent: 2:df30734270ae tip |
|
97 | 97 | 2 |
|
98 | 98 | branch: default |
|
99 | 99 | commit: (clean) |
|
100 | 100 | update: (current) |
|
101 | 101 | |
|
102 | 102 | bump sub rev (and check it is ignored by ui.commitsubrepos) |
|
103 | 103 | |
|
104 | 104 | $ echo b > s/a |
|
105 | 105 | $ hg -R s ci -ms1 |
|
106 | 106 | $ hg --config ui.commitsubrepos=no ci -m3 |
|
107 | 107 | |
|
108 | 108 | leave sub dirty (and check ui.commitsubrepos=no aborts the commit) |
|
109 | 109 | |
|
110 | 110 | $ echo c > s/a |
|
111 | 111 | $ hg --config ui.commitsubrepos=no ci -m4 |
|
112 | 112 | abort: uncommitted changes in subrepo s |
|
113 | 113 | (use --subrepos for recursive commit) |
|
114 | 114 | [255] |
|
115 | 115 | $ hg id |
|
116 | 116 | f6affe3fbfaa+ tip |
|
117 | 117 | $ hg -R s ci -mc |
|
118 | 118 | $ hg id |
|
119 | 119 | f6affe3fbfaa+ tip |
|
120 | 120 | $ echo d > s/a |
|
121 | 121 | $ hg ci -m4 |
|
122 | 122 | committing subrepository s |
|
123 | 123 | $ hg tip -R s |
|
124 | 124 | changeset: 4:02dcf1d70411 |
|
125 | 125 | tag: tip |
|
126 | 126 | user: test |
|
127 | 127 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
128 | 128 | summary: 4 |
|
129 | 129 | |
|
130 | 130 | |
|
131 | 131 | check caching |
|
132 | 132 | |
|
133 | 133 | $ hg co 0 |
|
134 | 134 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
135 | 135 | $ hg debugsub |
|
136 | 136 | |
|
137 | 137 | restore |
|
138 | 138 | |
|
139 | 139 | $ hg co |
|
140 | 140 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
141 | 141 | $ hg debugsub |
|
142 | 142 | path s |
|
143 | 143 | source s |
|
144 | 144 | revision 02dcf1d704118aee3ee306ccfa1910850d5b05ef |
|
145 | 145 | |
|
146 | 146 | new branch for merge tests |
|
147 | 147 | |
|
148 | 148 | $ hg co 1 |
|
149 | 149 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
150 | 150 | $ echo t = t >> .hgsub |
|
151 | 151 | $ hg init t |
|
152 | 152 | $ echo t > t/t |
|
153 | 153 | $ hg -R t add t |
|
154 | 154 | adding t/t (glob) |
|
155 | 155 | |
|
156 | 156 | 5 |
|
157 | 157 | |
|
158 | 158 | $ hg ci -m5 # add sub |
|
159 | 159 | committing subrepository t |
|
160 | 160 | created new head |
|
161 | 161 | $ echo t2 > t/t |
|
162 | 162 | |
|
163 | 163 | 6 |
|
164 | 164 | |
|
165 | 165 | $ hg st -R s |
|
166 | 166 | $ hg ci -m6 # change sub |
|
167 | 167 | committing subrepository t |
|
168 | 168 | $ hg debugsub |
|
169 | 169 | path s |
|
170 | 170 | source s |
|
171 | 171 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
172 | 172 | path t |
|
173 | 173 | source t |
|
174 | 174 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad |
|
175 | 175 | $ echo t3 > t/t |
|
176 | 176 | |
|
177 | 177 | 7 |
|
178 | 178 | |
|
179 | 179 | $ hg ci -m7 # change sub again for conflict test |
|
180 | 180 | committing subrepository t |
|
181 | 181 | $ hg rm .hgsub |
|
182 | 182 | |
|
183 | 183 | 8 |
|
184 | 184 | |
|
185 | 185 | $ hg ci -m8 # remove sub |
|
186 | 186 | |
|
187 | 187 | merge tests |
|
188 | 188 | |
|
189 | 189 | $ hg co -C 3 |
|
190 | 190 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
191 | 191 | $ hg merge 5 # test adding |
|
192 | 192 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
193 | 193 | (branch merge, don't forget to commit) |
|
194 | 194 | $ hg debugsub |
|
195 | 195 | path s |
|
196 | 196 | source s |
|
197 | 197 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 |
|
198 | 198 | path t |
|
199 | 199 | source t |
|
200 | 200 | revision 60ca1237c19474e7a3978b0dc1ca4e6f36d51382 |
|
201 | 201 | $ hg ci -m9 |
|
202 | 202 | created new head |
|
203 | 203 | $ hg merge 6 --debug # test change |
|
204 | 204 | searching for copies back to rev 2 |
|
205 | 205 | resolving manifests |
|
206 | 206 | overwrite: False, partial: False |
|
207 | 207 | ancestor: 1f14a2e2d3ec, local: f0d2028bf86d+, remote: 1831e14459c4 |
|
208 | 208 | .hgsubstate: versions differ -> m |
|
209 | 209 | updating: .hgsubstate 1/1 files (100.00%) |
|
210 | 210 | subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec |
|
211 | 211 | subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg |
|
212 | 212 | getting subrepo t |
|
213 | 213 | searching for copies back to rev 1 |
|
214 | 214 | resolving manifests |
|
215 | 215 | overwrite: False, partial: False |
|
216 | 216 | ancestor: 60ca1237c194, local: 60ca1237c194+, remote: 6747d179aa9a |
|
217 | 217 | t: remote is newer -> g |
|
218 | 218 | updating: t 1/1 files (100.00%) |
|
219 | 219 | getting t |
|
220 | 220 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
221 | 221 | (branch merge, don't forget to commit) |
|
222 | 222 | $ hg debugsub |
|
223 | 223 | path s |
|
224 | 224 | source s |
|
225 | 225 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 |
|
226 | 226 | path t |
|
227 | 227 | source t |
|
228 | 228 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad |
|
229 | 229 | $ echo conflict > t/t |
|
230 | 230 | $ hg ci -m10 |
|
231 | 231 | committing subrepository t |
|
232 | 232 | $ HGMERGE=internal:merge hg merge --debug 7 # test conflict |
|
233 | 233 | searching for copies back to rev 2 |
|
234 | 234 | resolving manifests |
|
235 | 235 | overwrite: False, partial: False |
|
236 | 236 | ancestor: 1831e14459c4, local: e45c8b14af55+, remote: f94576341bcf |
|
237 | 237 | .hgsubstate: versions differ -> m |
|
238 | 238 | updating: .hgsubstate 1/1 files (100.00%) |
|
239 | 239 | subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4 |
|
240 | 240 | subrepo t: both sides changed, merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg |
|
241 | 241 | merging subrepo t |
|
242 | 242 | searching for copies back to rev 2 |
|
243 | 243 | resolving manifests |
|
244 | 244 | overwrite: False, partial: False |
|
245 | 245 | ancestor: 6747d179aa9a, local: 20a0db6fbf6c+, remote: 7af322bc1198 |
|
246 | 246 | t: versions differ -> m |
|
247 | 247 | preserving t for resolve of t |
|
248 | 248 | updating: t 1/1 files (100.00%) |
|
249 | 249 | picked tool 'internal:merge' for t (binary False symlink False) |
|
250 | 250 | merging t |
|
251 | 251 | my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a |
|
252 | 252 | warning: conflicts during merge. |
|
253 | 253 | merging t incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
254 | 254 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
255 | 255 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
256 | 256 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
257 | 257 | (branch merge, don't forget to commit) |
|
258 | 258 | |
|
259 | 259 | should conflict |
|
260 | 260 | |
|
261 | 261 | $ cat t/t |
|
262 | 262 | <<<<<<< local |
|
263 | 263 | conflict |
|
264 | 264 | ======= |
|
265 | 265 | t3 |
|
266 | 266 | >>>>>>> other |
|
267 | 267 | |
|
268 | 268 | clone |
|
269 | 269 | |
|
270 | 270 | $ cd .. |
|
271 | 271 | $ hg clone t tc |
|
272 | 272 | updating to branch default |
|
273 | 273 | cloning subrepo s from $TESTTMP/t/s (glob) |
|
274 | 274 | cloning subrepo s/ss from $TESTTMP/t/s/ss (glob) |
|
275 | 275 | cloning subrepo t from $TESTTMP/t/t (glob) |
|
276 | 276 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
277 | 277 | $ cd tc |
|
278 | 278 | $ hg debugsub |
|
279 | 279 | path s |
|
280 | 280 | source s |
|
281 | 281 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 |
|
282 | 282 | path t |
|
283 | 283 | source t |
|
284 | 284 | revision 20a0db6fbf6c3d2836e6519a642ae929bfc67c0e |
|
285 | 285 | |
|
286 | 286 | push |
|
287 | 287 | |
|
288 | 288 | $ echo bah > t/t |
|
289 | 289 | $ hg ci -m11 |
|
290 | 290 | committing subrepository t |
|
291 | 291 | $ hg push |
|
292 | 292 | pushing to $TESTTMP/t (glob) |
|
293 | 293 | pushing subrepo s/ss to $TESTTMP/t/s/ss (glob) |
|
294 | 294 | searching for changes |
|
295 | 295 | no changes found |
|
296 | 296 | pushing subrepo s to $TESTTMP/t/s (glob) |
|
297 | 297 | searching for changes |
|
298 | 298 | no changes found |
|
299 | 299 | pushing subrepo t to $TESTTMP/t/t (glob) |
|
300 | 300 | searching for changes |
|
301 | 301 | adding changesets |
|
302 | 302 | adding manifests |
|
303 | 303 | adding file changes |
|
304 | 304 | added 1 changesets with 1 changes to 1 files |
|
305 | 305 | searching for changes |
|
306 | 306 | adding changesets |
|
307 | 307 | adding manifests |
|
308 | 308 | adding file changes |
|
309 | 309 | added 1 changesets with 1 changes to 1 files |
|
310 | 310 | |
|
311 | 311 | push -f |
|
312 | 312 | |
|
313 | 313 | $ echo bah > s/a |
|
314 | 314 | $ hg ci -m12 |
|
315 | 315 | committing subrepository s |
|
316 | 316 | $ hg push |
|
317 | 317 | pushing to $TESTTMP/t (glob) |
|
318 | 318 | pushing subrepo s/ss to $TESTTMP/t/s/ss (glob) |
|
319 | 319 | searching for changes |
|
320 | 320 | no changes found |
|
321 | 321 | pushing subrepo s to $TESTTMP/t/s (glob) |
|
322 | 322 | searching for changes |
|
323 | 323 | abort: push creates new remote head 12a213df6fa9! (in subrepo s) |
|
324 | 324 | (did you forget to merge? use push -f to force) |
|
325 | 325 | [255] |
|
326 | 326 | $ hg push -f |
|
327 | 327 | pushing to $TESTTMP/t (glob) |
|
328 | 328 | pushing subrepo s/ss to $TESTTMP/t/s/ss (glob) |
|
329 | 329 | searching for changes |
|
330 | 330 | no changes found |
|
331 | 331 | pushing subrepo s to $TESTTMP/t/s (glob) |
|
332 | 332 | searching for changes |
|
333 | 333 | adding changesets |
|
334 | 334 | adding manifests |
|
335 | 335 | adding file changes |
|
336 | 336 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
337 | 337 | pushing subrepo t to $TESTTMP/t/t (glob) |
|
338 | 338 | searching for changes |
|
339 | 339 | no changes found |
|
340 | 340 | searching for changes |
|
341 | 341 | adding changesets |
|
342 | 342 | adding manifests |
|
343 | 343 | adding file changes |
|
344 | 344 | added 1 changesets with 1 changes to 1 files |
|
345 | 345 | |
|
346 | 346 | update |
|
347 | 347 | |
|
348 | 348 | $ cd ../t |
|
349 | 349 | $ hg up -C # discard our earlier merge |
|
350 | 350 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
351 | 351 | $ echo blah > t/t |
|
352 | 352 | $ hg ci -m13 |
|
353 | 353 | committing subrepository t |
|
354 | 354 | |
|
355 | 355 | pull |
|
356 | 356 | |
|
357 | 357 | $ cd ../tc |
|
358 | 358 | $ hg pull |
|
359 | 359 | pulling from $TESTTMP/t (glob) |
|
360 | 360 | searching for changes |
|
361 | 361 | adding changesets |
|
362 | 362 | adding manifests |
|
363 | 363 | adding file changes |
|
364 | 364 | added 1 changesets with 1 changes to 1 files |
|
365 | 365 | (run 'hg update' to get a working copy) |
|
366 | 366 | |
|
367 | 367 | should pull t |
|
368 | 368 | |
|
369 | 369 | $ hg up |
|
370 | 370 | pulling subrepo t from $TESTTMP/t/t (glob) |
|
371 | 371 | searching for changes |
|
372 | 372 | adding changesets |
|
373 | 373 | adding manifests |
|
374 | 374 | adding file changes |
|
375 | 375 | added 1 changesets with 1 changes to 1 files |
|
376 | 376 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
377 | 377 | $ cat t/t |
|
378 | 378 | blah |
|
379 | 379 | |
|
380 | 380 | bogus subrepo path aborts |
|
381 | 381 | |
|
382 | 382 | $ echo 'bogus=[boguspath' >> .hgsub |
|
383 | 383 | $ hg ci -m 'bogus subrepo path' |
|
384 | 384 | abort: missing ] in subrepo source |
|
385 | 385 | [255] |
|
386 | 386 | |
|
387 | 387 | Issue1986: merge aborts when trying to merge a subrepo that |
|
388 | 388 | shouldn't need merging |
|
389 | 389 | |
|
390 | 390 | # subrepo layout |
|
391 | 391 | # |
|
392 | 392 | # o 5 br |
|
393 | 393 | # /| |
|
394 | 394 | # o | 4 default |
|
395 | 395 | # | | |
|
396 | 396 | # | o 3 br |
|
397 | 397 | # |/| |
|
398 | 398 | # o | 2 default |
|
399 | 399 | # | | |
|
400 | 400 | # | o 1 br |
|
401 | 401 | # |/ |
|
402 | 402 | # o 0 default |
|
403 | 403 | |
|
404 | 404 | $ cd .. |
|
405 | 405 | $ rm -rf sub |
|
406 | 406 | $ hg init main |
|
407 | 407 | $ cd main |
|
408 | 408 | $ hg init s |
|
409 | 409 | $ cd s |
|
410 | 410 | $ echo a > a |
|
411 | 411 | $ hg ci -Am1 |
|
412 | 412 | adding a |
|
413 | 413 | $ hg branch br |
|
414 | 414 | marked working directory as branch br |
|
415 | 415 | (branches are permanent and global, did you want a bookmark?) |
|
416 | 416 | $ echo a >> a |
|
417 | 417 | $ hg ci -m1 |
|
418 | 418 | $ hg up default |
|
419 | 419 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
420 | 420 | $ echo b > b |
|
421 | 421 | $ hg ci -Am1 |
|
422 | 422 | adding b |
|
423 | 423 | $ hg up br |
|
424 | 424 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
425 | 425 | $ hg merge tip |
|
426 | 426 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
427 | 427 | (branch merge, don't forget to commit) |
|
428 | 428 | $ hg ci -m1 |
|
429 | 429 | $ hg up 2 |
|
430 | 430 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
431 | 431 | $ echo c > c |
|
432 | 432 | $ hg ci -Am1 |
|
433 | 433 | adding c |
|
434 | 434 | $ hg up 3 |
|
435 | 435 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
436 | 436 | $ hg merge 4 |
|
437 | 437 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
438 | 438 | (branch merge, don't forget to commit) |
|
439 | 439 | $ hg ci -m1 |
|
440 | 440 | |
|
441 | 441 | # main repo layout: |
|
442 | 442 | # |
|
443 | 443 | # * <-- try to merge default into br again |
|
444 | 444 | # .`| |
|
445 | 445 | # . o 5 br --> substate = 5 |
|
446 | 446 | # . | |
|
447 | 447 | # o | 4 default --> substate = 4 |
|
448 | 448 | # | | |
|
449 | 449 | # | o 3 br --> substate = 2 |
|
450 | 450 | # |/| |
|
451 | 451 | # o | 2 default --> substate = 2 |
|
452 | 452 | # | | |
|
453 | 453 | # | o 1 br --> substate = 3 |
|
454 | 454 | # |/ |
|
455 | 455 | # o 0 default --> substate = 2 |
|
456 | 456 | |
|
457 | 457 | $ cd .. |
|
458 | 458 | $ echo 's = s' > .hgsub |
|
459 | 459 | $ hg -R s up 2 |
|
460 | 460 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
461 | 461 | $ hg ci -Am1 |
|
462 | 462 | adding .hgsub |
|
463 | 463 | $ hg branch br |
|
464 | 464 | marked working directory as branch br |
|
465 | 465 | (branches are permanent and global, did you want a bookmark?) |
|
466 | 466 | $ echo b > b |
|
467 | 467 | $ hg -R s up 3 |
|
468 | 468 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
469 | 469 | $ hg ci -Am1 |
|
470 | 470 | adding b |
|
471 | 471 | $ hg up default |
|
472 | 472 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
473 | 473 | $ echo c > c |
|
474 | 474 | $ hg ci -Am1 |
|
475 | 475 | adding c |
|
476 | 476 | $ hg up 1 |
|
477 | 477 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
478 | 478 | $ hg merge 2 |
|
479 | 479 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
480 | 480 | (branch merge, don't forget to commit) |
|
481 | 481 | $ hg ci -m1 |
|
482 | 482 | $ hg up 2 |
|
483 | 483 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
484 | 484 | $ hg -R s up 4 |
|
485 | 485 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
486 | 486 | $ echo d > d |
|
487 | 487 | $ hg ci -Am1 |
|
488 | 488 | adding d |
|
489 | 489 | $ hg up 3 |
|
490 | 490 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
491 | 491 | $ hg -R s up 5 |
|
492 | 492 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
493 | 493 | $ echo e > e |
|
494 | 494 | $ hg ci -Am1 |
|
495 | 495 | adding e |
|
496 | 496 | |
|
497 | 497 | $ hg up 5 |
|
498 | 498 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
499 | 499 | $ hg merge 4 # try to merge default into br again |
|
500 | 500 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
501 | 501 | (branch merge, don't forget to commit) |
|
502 | 502 | $ cd .. |
|
503 | 503 | |
|
504 | 504 | test subrepo delete from .hgsubstate |
|
505 | 505 | |
|
506 | 506 | $ hg init testdelete |
|
507 | 507 | $ mkdir testdelete/nested testdelete/nested2 |
|
508 | 508 | $ hg init testdelete/nested |
|
509 | 509 | $ hg init testdelete/nested2 |
|
510 | 510 | $ echo test > testdelete/nested/foo |
|
511 | 511 | $ echo test > testdelete/nested2/foo |
|
512 | 512 | $ hg -R testdelete/nested add |
|
513 | 513 | adding testdelete/nested/foo (glob) |
|
514 | 514 | $ hg -R testdelete/nested2 add |
|
515 | 515 | adding testdelete/nested2/foo (glob) |
|
516 | 516 | $ hg -R testdelete/nested ci -m test |
|
517 | 517 | $ hg -R testdelete/nested2 ci -m test |
|
518 | 518 | $ echo nested = nested > testdelete/.hgsub |
|
519 | 519 | $ echo nested2 = nested2 >> testdelete/.hgsub |
|
520 | 520 | $ hg -R testdelete add |
|
521 | 521 | adding testdelete/.hgsub (glob) |
|
522 | 522 | $ hg -R testdelete ci -m "nested 1 & 2 added" |
|
523 | 523 | $ echo nested = nested > testdelete/.hgsub |
|
524 | 524 | $ hg -R testdelete ci -m "nested 2 deleted" |
|
525 | 525 | $ cat testdelete/.hgsubstate |
|
526 | 526 | bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested |
|
527 | 527 | $ hg -R testdelete remove testdelete/.hgsub |
|
528 | 528 | $ hg -R testdelete ci -m ".hgsub deleted" |
|
529 | 529 | $ cat testdelete/.hgsubstate |
|
530 | 530 | bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested |
|
531 | 531 | |
|
532 | 532 | test repository cloning |
|
533 | 533 | |
|
534 | 534 | $ mkdir mercurial mercurial2 |
|
535 | 535 | $ hg init nested_absolute |
|
536 | 536 | $ echo test > nested_absolute/foo |
|
537 | 537 | $ hg -R nested_absolute add |
|
538 | 538 | adding nested_absolute/foo (glob) |
|
539 | 539 | $ hg -R nested_absolute ci -mtest |
|
540 | 540 | $ cd mercurial |
|
541 | 541 | $ hg init nested_relative |
|
542 | 542 | $ echo test2 > nested_relative/foo2 |
|
543 | 543 | $ hg -R nested_relative add |
|
544 | 544 | adding nested_relative/foo2 (glob) |
|
545 | 545 | $ hg -R nested_relative ci -mtest2 |
|
546 | 546 | $ hg init main |
|
547 | 547 | $ echo "nested_relative = ../nested_relative" > main/.hgsub |
|
548 | 548 | $ echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub |
|
549 | 549 | $ hg -R main add |
|
550 | 550 | adding main/.hgsub (glob) |
|
551 | 551 | $ hg -R main ci -m "add subrepos" |
|
552 | 552 | $ cd .. |
|
553 | 553 | $ hg clone mercurial/main mercurial2/main |
|
554 | 554 | updating to branch default |
|
555 | 555 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
556 | 556 | $ cat mercurial2/main/nested_absolute/.hg/hgrc \ |
|
557 | 557 | > mercurial2/main/nested_relative/.hg/hgrc |
|
558 | 558 | [paths] |
|
559 | 559 | default = $TESTTMP/mercurial/nested_absolute |
|
560 | 560 | [paths] |
|
561 | 561 | default = $TESTTMP/mercurial/nested_relative |
|
562 | 562 | $ rm -rf mercurial mercurial2 |
|
563 | 563 | |
|
564 | 564 | Issue1977: multirepo push should fail if subrepo push fails |
|
565 | 565 | |
|
566 | 566 | $ hg init repo |
|
567 | 567 | $ hg init repo/s |
|
568 | 568 | $ echo a > repo/s/a |
|
569 | 569 | $ hg -R repo/s ci -Am0 |
|
570 | 570 | adding a |
|
571 | 571 | $ echo s = s > repo/.hgsub |
|
572 | 572 | $ hg -R repo ci -Am1 |
|
573 | 573 | adding .hgsub |
|
574 | 574 | $ hg clone repo repo2 |
|
575 | 575 | updating to branch default |
|
576 | 576 | cloning subrepo s from $TESTTMP/repo/s (glob) |
|
577 | 577 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
578 | 578 | $ hg -q -R repo2 pull -u |
|
579 | 579 | $ echo 1 > repo2/s/a |
|
580 | 580 | $ hg -R repo2/s ci -m2 |
|
581 | 581 | $ hg -q -R repo2/s push |
|
582 | 582 | $ hg -R repo2/s up -C 0 |
|
583 | 583 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
584 | 584 | $ echo 2 > repo2/s/b |
|
585 | 585 | $ hg -R repo2/s ci -m3 -A |
|
586 | 586 | adding b |
|
587 | 587 | created new head |
|
588 | 588 | $ hg -R repo2 ci -m3 |
|
589 | 589 | $ hg -q -R repo2 push |
|
590 | 590 | abort: push creates new remote head cc505f09a8b2! (in subrepo s) |
|
591 | 591 | (did you forget to merge? use push -f to force) |
|
592 | 592 | [255] |
|
593 | 593 | $ hg -R repo update |
|
594 | 594 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
595 | 595 | |
|
596 | 596 | test if untracked file is not overwritten |
|
597 | 597 | |
|
598 | 598 | $ echo issue3276_ok > repo/s/b |
|
599 | 599 | $ hg -R repo2 push -f -q |
|
600 | 600 | $ hg -R repo update |
|
601 | 601 | b: untracked file differs |
|
602 | 602 | abort: untracked files in working directory differ from files in requested revision (in subrepo s) |
|
603 | 603 | [255] |
|
604 | 604 | |
|
605 | 605 | $ cat repo/s/b |
|
606 | 606 | issue3276_ok |
|
607 | 607 | $ rm repo/s/b |
|
608 | 608 | $ hg -R repo revert --all |
|
609 | 609 | reverting repo/.hgsubstate (glob) |
|
610 | 610 | reverting subrepo s |
|
611 | 611 | $ hg -R repo update |
|
612 | 612 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
613 | 613 | $ cat repo/s/b |
|
614 | 614 | 2 |
|
615 | 615 | $ rm -rf repo2 repo |
|
616 | 616 | |
|
617 | 617 | |
|
618 | 618 | Issue1852 subrepos with relative paths always push/pull relative to default |
|
619 | 619 | |
|
620 | 620 | Prepare a repo with subrepo |
|
621 | 621 | |
|
622 | 622 | $ hg init issue1852a |
|
623 | 623 | $ cd issue1852a |
|
624 | 624 | $ hg init sub/repo |
|
625 | 625 | $ echo test > sub/repo/foo |
|
626 | 626 | $ hg -R sub/repo add sub/repo/foo |
|
627 | 627 | $ echo sub/repo = sub/repo > .hgsub |
|
628 | 628 | $ hg add .hgsub |
|
629 | 629 | $ hg ci -mtest |
|
630 | 630 | committing subrepository sub/repo (glob) |
|
631 | 631 | $ echo test >> sub/repo/foo |
|
632 | 632 | $ hg ci -mtest |
|
633 | 633 | committing subrepository sub/repo (glob) |
|
634 | 634 | $ cd .. |
|
635 | 635 | |
|
636 | 636 | Create repo without default path, pull top repo, and see what happens on update |
|
637 | 637 | |
|
638 | 638 | $ hg init issue1852b |
|
639 | 639 | $ hg -R issue1852b pull issue1852a |
|
640 | 640 | pulling from issue1852a |
|
641 | 641 | requesting all changes |
|
642 | 642 | adding changesets |
|
643 | 643 | adding manifests |
|
644 | 644 | adding file changes |
|
645 | 645 | added 2 changesets with 3 changes to 2 files |
|
646 | 646 | (run 'hg update' to get a working copy) |
|
647 | 647 | $ hg -R issue1852b update |
|
648 | 648 | abort: default path for subrepository not found (in subrepo sub/repo) (glob) |
|
649 | 649 | [255] |
|
650 | 650 | |
|
651 | 651 | Pull -u now doesn't help |
|
652 | 652 | |
|
653 | 653 | $ hg -R issue1852b pull -u issue1852a |
|
654 | 654 | pulling from issue1852a |
|
655 | 655 | searching for changes |
|
656 | 656 | no changes found |
|
657 | 657 | |
|
658 | 658 | Try the same, but with pull -u |
|
659 | 659 | |
|
660 | 660 | $ hg init issue1852c |
|
661 | 661 | $ hg -R issue1852c pull -r0 -u issue1852a |
|
662 | 662 | pulling from issue1852a |
|
663 | 663 | adding changesets |
|
664 | 664 | adding manifests |
|
665 | 665 | adding file changes |
|
666 | 666 | added 1 changesets with 2 changes to 2 files |
|
667 | 667 | cloning subrepo sub/repo from issue1852a/sub/repo (glob) |
|
668 | 668 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
669 | 669 | |
|
670 | 670 | Try to push from the other side |
|
671 | 671 | |
|
672 | 672 | $ hg -R issue1852a push `pwd`/issue1852c |
|
673 | 673 | pushing to $TESTTMP/issue1852c |
|
674 | 674 | pushing subrepo sub/repo to $TESTTMP/issue1852c/sub/repo (glob) |
|
675 | 675 | searching for changes |
|
676 | 676 | no changes found |
|
677 | 677 | searching for changes |
|
678 | 678 | adding changesets |
|
679 | 679 | adding manifests |
|
680 | 680 | adding file changes |
|
681 | 681 | added 1 changesets with 1 changes to 1 files |
|
682 | 682 | |
|
683 | 683 | Incoming and outgoing should not use the default path: |
|
684 | 684 | |
|
685 | 685 | $ hg clone -q issue1852a issue1852d |
|
686 | 686 | $ hg -R issue1852d outgoing --subrepos issue1852c |
|
687 | 687 | comparing with issue1852c |
|
688 | 688 | searching for changes |
|
689 | 689 | no changes found |
|
690 | 690 | comparing with issue1852c/sub/repo |
|
691 | 691 | searching for changes |
|
692 | 692 | no changes found |
|
693 | 693 | [1] |
|
694 | 694 | $ hg -R issue1852d incoming --subrepos issue1852c |
|
695 | 695 | comparing with issue1852c |
|
696 | 696 | searching for changes |
|
697 | 697 | no changes found |
|
698 | 698 | comparing with issue1852c/sub/repo |
|
699 | 699 | searching for changes |
|
700 | 700 | no changes found |
|
701 | 701 | [1] |
|
702 | 702 | |
|
703 | 703 | Check status of files when none of them belong to the first |
|
704 | 704 | subrepository: |
|
705 | 705 | |
|
706 | 706 | $ hg init subrepo-status |
|
707 | 707 | $ cd subrepo-status |
|
708 | 708 | $ hg init subrepo-1 |
|
709 | 709 | $ hg init subrepo-2 |
|
710 | 710 | $ cd subrepo-2 |
|
711 | 711 | $ touch file |
|
712 | 712 | $ hg add file |
|
713 | 713 | $ cd .. |
|
714 | 714 | $ echo subrepo-1 = subrepo-1 > .hgsub |
|
715 | 715 | $ echo subrepo-2 = subrepo-2 >> .hgsub |
|
716 | 716 | $ hg add .hgsub |
|
717 | 717 | $ hg ci -m 'Added subrepos' |
|
718 | 718 | committing subrepository subrepo-2 |
|
719 | 719 | $ hg st subrepo-2/file |
|
720 | 720 | |
|
721 | 721 | Check that share works with subrepo |
|
722 | 722 | $ hg --config extensions.share= share . ../shared |
|
723 | 723 | updating working directory |
|
724 | 724 | cloning subrepo subrepo-2 from $TESTTMP/subrepo-status/subrepo-2 |
|
725 | 725 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
726 | 726 | $ test -f ../shared/subrepo-1/.hg/sharedpath |
|
727 | 727 | [1] |
|
728 | 728 | $ hg -R ../shared in |
|
729 | 729 | abort: repository default not found! |
|
730 | 730 | [255] |
|
731 | 731 | $ hg -R ../shared/subrepo-2 showconfig paths |
|
732 | 732 | paths.default=$TESTTMP/subrepo-status/subrepo-2 |
|
733 | 733 | $ hg -R ../shared/subrepo-1 sum --remote |
|
734 | 734 | parent: -1:000000000000 tip (empty repository) |
|
735 | 735 | branch: default |
|
736 | 736 | commit: (clean) |
|
737 | 737 | update: (current) |
|
738 | 738 | remote: (synced) |
|
739 | 739 | |
|
740 | 740 | Check hg update --clean |
|
741 | 741 | $ cd $TESTTMP/t |
|
742 | 742 | $ rm -r t/t.orig |
|
743 | 743 | $ hg status -S --all |
|
744 | 744 | C .hgsub |
|
745 | 745 | C .hgsubstate |
|
746 | 746 | C a |
|
747 | 747 | C s/.hgsub |
|
748 | 748 | C s/.hgsubstate |
|
749 | 749 | C s/a |
|
750 | 750 | C s/ss/a |
|
751 | 751 | C t/t |
|
752 | 752 | $ echo c1 > s/a |
|
753 | 753 | $ cd s |
|
754 | 754 | $ echo c1 > b |
|
755 | 755 | $ echo c1 > c |
|
756 | 756 | $ hg add b |
|
757 | 757 | $ cd .. |
|
758 | 758 | $ hg status -S |
|
759 | 759 | M s/a |
|
760 | 760 | A s/b |
|
761 | 761 | ? s/c |
|
762 | 762 | $ hg update -C |
|
763 | 763 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
764 | 764 | $ hg status -S |
|
765 | 765 | ? s/b |
|
766 | 766 | ? s/c |
|
767 | 767 | |
|
768 | 768 | Sticky subrepositories, no changes |
|
769 | 769 | $ cd $TESTTMP/t |
|
770 | 770 | $ hg id |
|
771 | 771 | 925c17564ef8 tip |
|
772 | 772 | $ hg -R s id |
|
773 | 773 | 12a213df6fa9 tip |
|
774 | 774 | $ hg -R t id |
|
775 | 775 | 52c0adc0515a tip |
|
776 | 776 | $ hg update 11 |
|
777 | 777 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
778 | 778 | $ hg id |
|
779 | 779 | 365661e5936a |
|
780 | 780 | $ hg -R s id |
|
781 | 781 | fc627a69481f |
|
782 | 782 | $ hg -R t id |
|
783 | 783 | e95bcfa18a35 |
|
784 | 784 | |
|
785 | 785 | Sticky subrepositorys, file changes |
|
786 | 786 | $ touch s/f1 |
|
787 | 787 | $ touch t/f1 |
|
788 | 788 | $ hg add -S s/f1 |
|
789 | 789 | $ hg add -S t/f1 |
|
790 | 790 | $ hg id |
|
791 | 791 | 365661e5936a+ |
|
792 | 792 | $ hg -R s id |
|
793 | 793 | fc627a69481f+ |
|
794 | 794 | $ hg -R t id |
|
795 | 795 | e95bcfa18a35+ |
|
796 | 796 | $ hg update tip |
|
797 | 797 | subrepository sources for s differ |
|
798 | 798 | use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)? |
|
799 | 799 | l |
|
800 | 800 | subrepository sources for t differ |
|
801 | 801 | use (l)ocal source (e95bcfa18a35) or (r)emote source (52c0adc0515a)? |
|
802 | 802 | l |
|
803 | 803 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
804 | 804 | $ hg id |
|
805 | 805 | 925c17564ef8+ tip |
|
806 | 806 | $ hg -R s id |
|
807 | 807 | fc627a69481f+ |
|
808 | 808 | $ hg -R t id |
|
809 | 809 | e95bcfa18a35+ |
|
810 | 810 | $ hg update --clean tip |
|
811 | 811 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
812 | 812 | |
|
813 | 813 | Sticky subrepository, revision updates |
|
814 | 814 | $ hg id |
|
815 | 815 | 925c17564ef8 tip |
|
816 | 816 | $ hg -R s id |
|
817 | 817 | 12a213df6fa9 tip |
|
818 | 818 | $ hg -R t id |
|
819 | 819 | 52c0adc0515a tip |
|
820 | 820 | $ cd s |
|
821 | 821 | $ hg update -r -2 |
|
822 | 822 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
823 | 823 | $ cd ../t |
|
824 | 824 | $ hg update -r 2 |
|
825 | 825 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
826 | 826 | $ cd .. |
|
827 | 827 | $ hg update 10 |
|
828 | 828 | subrepository sources for t differ (in checked out version) |
|
829 | 829 | use (l)ocal source (7af322bc1198) or (r)emote source (20a0db6fbf6c)? |
|
830 | 830 | l |
|
831 | 831 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
832 | 832 | $ hg id |
|
833 | 833 | e45c8b14af55+ |
|
834 | 834 | $ hg -R s id |
|
835 | 835 | 02dcf1d70411 |
|
836 | 836 | $ hg -R t id |
|
837 | 837 | 7af322bc1198 |
|
838 | 838 | |
|
839 | 839 | Sticky subrepository, file changes and revision updates |
|
840 | 840 | $ touch s/f1 |
|
841 | 841 | $ touch t/f1 |
|
842 | 842 | $ hg add -S s/f1 |
|
843 | 843 | $ hg add -S t/f1 |
|
844 | 844 | $ hg id |
|
845 | 845 | e45c8b14af55+ |
|
846 | 846 | $ hg -R s id |
|
847 | 847 | 02dcf1d70411+ |
|
848 | 848 | $ hg -R t id |
|
849 | 849 | 7af322bc1198+ |
|
850 | 850 | $ hg update tip |
|
851 | 851 | subrepository sources for s differ |
|
852 | 852 | use (l)ocal source (02dcf1d70411) or (r)emote source (12a213df6fa9)? |
|
853 | 853 | l |
|
854 | 854 | subrepository sources for t differ |
|
855 | 855 | use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)? |
|
856 | 856 | l |
|
857 | 857 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
858 | 858 | $ hg id |
|
859 | 859 | 925c17564ef8+ tip |
|
860 | 860 | $ hg -R s id |
|
861 | 861 | 02dcf1d70411+ |
|
862 | 862 | $ hg -R t id |
|
863 | 863 | 7af322bc1198+ |
|
864 | 864 | |
|
865 | 865 | Sticky repository, update --clean |
|
866 | 866 | $ hg update --clean tip |
|
867 | 867 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
868 | 868 | $ hg id |
|
869 | 869 | 925c17564ef8 tip |
|
870 | 870 | $ hg -R s id |
|
871 | 871 | 12a213df6fa9 tip |
|
872 | 872 | $ hg -R t id |
|
873 | 873 | 52c0adc0515a tip |
|
874 | 874 | |
|
875 | 875 | Test subrepo already at intended revision: |
|
876 | 876 | $ cd s |
|
877 | 877 | $ hg update fc627a69481f |
|
878 | 878 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
879 | 879 | $ cd .. |
|
880 | 880 | $ hg update 11 |
|
881 | 881 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
882 | 882 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
883 | 883 | $ hg id -n |
|
884 | 884 | 11+ |
|
885 | 885 | $ hg -R s id |
|
886 | 886 | fc627a69481f |
|
887 | 887 | $ hg -R t id |
|
888 | 888 | e95bcfa18a35 |
|
889 | 889 | |
|
890 | 890 | Test that removing .hgsubstate doesn't break anything: |
|
891 | 891 | |
|
892 | 892 | $ hg rm -f .hgsubstate |
|
893 | 893 | $ hg ci -mrm |
|
894 | 894 | nothing changed |
|
895 | 895 | [1] |
|
896 | 896 | $ hg log -vr tip |
|
897 | 897 | changeset: 13:925c17564ef8 |
|
898 | 898 | tag: tip |
|
899 | 899 | user: test |
|
900 | 900 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
901 | 901 | files: .hgsubstate |
|
902 | 902 | description: |
|
903 | 903 | 13 |
|
904 | 904 | |
|
905 | 905 | |
|
906 | 906 | |
|
907 | 907 | Test that removing .hgsub removes .hgsubstate: |
|
908 | 908 | |
|
909 | 909 | $ hg rm .hgsub |
|
910 | 910 | $ hg ci -mrm2 |
|
911 | 911 | created new head |
|
912 | 912 | $ hg log -vr tip |
|
913 | 913 | changeset: 14:2400bccd50af |
|
914 | 914 | tag: tip |
|
915 | 915 | parent: 11:365661e5936a |
|
916 | 916 | user: test |
|
917 | 917 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
918 | 918 | files: .hgsub .hgsubstate |
|
919 | 919 | description: |
|
920 | 920 | rm2 |
|
921 | 921 | |
|
922 | 922 | |
|
923 | 923 | Test issue3153: diff -S with deleted subrepos |
|
924 | 924 | |
|
925 | 925 | $ hg diff --nodates -S -c . |
|
926 | 926 | diff -r 365661e5936a -r 2400bccd50af .hgsub |
|
927 | 927 | --- a/.hgsub |
|
928 | 928 | +++ /dev/null |
|
929 | 929 | @@ -1,2 +0,0 @@ |
|
930 | 930 | -s = s |
|
931 | 931 | -t = t |
|
932 | 932 | diff -r 365661e5936a -r 2400bccd50af .hgsubstate |
|
933 | 933 | --- a/.hgsubstate |
|
934 | 934 | +++ /dev/null |
|
935 | 935 | @@ -1,2 +0,0 @@ |
|
936 | 936 | -fc627a69481fcbe5f1135069e8a3881c023e4cf5 s |
|
937 | 937 | -e95bcfa18a358dc4936da981ebf4147b4cad1362 t |
|
938 | 938 | |
|
939 | 939 | Test behavior of add for explicit path in subrepo: |
|
940 | 940 | $ cd .. |
|
941 | 941 | $ hg init explicit |
|
942 | 942 | $ cd explicit |
|
943 | 943 | $ echo s = s > .hgsub |
|
944 | 944 | $ hg add .hgsub |
|
945 | 945 | $ hg init s |
|
946 | 946 | $ hg ci -m0 |
|
947 | 947 | Adding with an explicit path in a subrepo adds the file |
|
948 | 948 | $ echo c1 > f1 |
|
949 | 949 | $ echo c2 > s/f2 |
|
950 | 950 | $ hg st -S |
|
951 | 951 | ? f1 |
|
952 | 952 | ? s/f2 |
|
953 | 953 | $ hg add s/f2 |
|
954 | 954 | $ hg st -S |
|
955 | 955 | A s/f2 |
|
956 | 956 | ? f1 |
|
957 | 957 | $ hg ci -R s -m0 |
|
958 | 958 | $ hg ci -Am1 |
|
959 | 959 | adding f1 |
|
960 | 960 | Adding with an explicit path in a subrepo with -S has the same behavior |
|
961 | 961 | $ echo c3 > f3 |
|
962 | 962 | $ echo c4 > s/f4 |
|
963 | 963 | $ hg st -S |
|
964 | 964 | ? f3 |
|
965 | 965 | ? s/f4 |
|
966 | 966 | $ hg add -S s/f4 |
|
967 | 967 | $ hg st -S |
|
968 | 968 | A s/f4 |
|
969 | 969 | ? f3 |
|
970 | 970 | $ hg ci -R s -m1 |
|
971 | 971 | $ hg ci -Ama2 |
|
972 | 972 | adding f3 |
|
973 | 973 | Adding without a path or pattern silently ignores subrepos |
|
974 | 974 | $ echo c5 > f5 |
|
975 | 975 | $ echo c6 > s/f6 |
|
976 | 976 | $ echo c7 > s/f7 |
|
977 | 977 | $ hg st -S |
|
978 | 978 | ? f5 |
|
979 | 979 | ? s/f6 |
|
980 | 980 | ? s/f7 |
|
981 | 981 | $ hg add |
|
982 | 982 | adding f5 |
|
983 | 983 | $ hg st -S |
|
984 | 984 | A f5 |
|
985 | 985 | ? s/f6 |
|
986 | 986 | ? s/f7 |
|
987 | 987 | $ hg ci -R s -Am2 |
|
988 | 988 | adding f6 |
|
989 | 989 | adding f7 |
|
990 | 990 | $ hg ci -m3 |
|
991 | 991 | Adding without a path or pattern with -S also adds files in subrepos |
|
992 | 992 | $ echo c8 > f8 |
|
993 | 993 | $ echo c9 > s/f9 |
|
994 | 994 | $ echo c10 > s/f10 |
|
995 | 995 | $ hg st -S |
|
996 | 996 | ? f8 |
|
997 | 997 | ? s/f10 |
|
998 | 998 | ? s/f9 |
|
999 | 999 | $ hg add -S |
|
1000 | 1000 | adding f8 |
|
1001 | 1001 | adding s/f10 (glob) |
|
1002 | 1002 | adding s/f9 (glob) |
|
1003 | 1003 | $ hg st -S |
|
1004 | 1004 | A f8 |
|
1005 | 1005 | A s/f10 |
|
1006 | 1006 | A s/f9 |
|
1007 | 1007 | $ hg ci -R s -m3 |
|
1008 | 1008 | $ hg ci -m4 |
|
1009 | 1009 | Adding with a pattern silently ignores subrepos |
|
1010 | 1010 | $ echo c11 > fm11 |
|
1011 | 1011 | $ echo c12 > fn12 |
|
1012 | 1012 | $ echo c13 > s/fm13 |
|
1013 | 1013 | $ echo c14 > s/fn14 |
|
1014 | 1014 | $ hg st -S |
|
1015 | 1015 | ? fm11 |
|
1016 | 1016 | ? fn12 |
|
1017 | 1017 | ? s/fm13 |
|
1018 | 1018 | ? s/fn14 |
|
1019 | 1019 | $ hg add 'glob:**fm*' |
|
1020 | 1020 | adding fm11 |
|
1021 | 1021 | $ hg st -S |
|
1022 | 1022 | A fm11 |
|
1023 | 1023 | ? fn12 |
|
1024 | 1024 | ? s/fm13 |
|
1025 | 1025 | ? s/fn14 |
|
1026 | 1026 | $ hg ci -R s -Am4 |
|
1027 | 1027 | adding fm13 |
|
1028 | 1028 | adding fn14 |
|
1029 | 1029 | $ hg ci -Am5 |
|
1030 | 1030 | adding fn12 |
|
1031 | 1031 | Adding with a pattern with -S also adds matches in subrepos |
|
1032 | 1032 | $ echo c15 > fm15 |
|
1033 | 1033 | $ echo c16 > fn16 |
|
1034 | 1034 | $ echo c17 > s/fm17 |
|
1035 | 1035 | $ echo c18 > s/fn18 |
|
1036 | 1036 | $ hg st -S |
|
1037 | 1037 | ? fm15 |
|
1038 | 1038 | ? fn16 |
|
1039 | 1039 | ? s/fm17 |
|
1040 | 1040 | ? s/fn18 |
|
1041 | 1041 | $ hg add -S 'glob:**fm*' |
|
1042 | 1042 | adding fm15 |
|
1043 | 1043 | adding s/fm17 (glob) |
|
1044 | 1044 | $ hg st -S |
|
1045 | 1045 | A fm15 |
|
1046 | 1046 | A s/fm17 |
|
1047 | 1047 | ? fn16 |
|
1048 | 1048 | ? s/fn18 |
|
1049 | 1049 | $ hg ci -R s -Am5 |
|
1050 | 1050 | adding fn18 |
|
1051 | 1051 | $ hg ci -Am6 |
|
1052 | 1052 | adding fn16 |
|
1053 | 1053 | |
|
1054 | 1054 | Test behavior of forget for explicit path in subrepo: |
|
1055 | 1055 | Forgetting an explicit path in a subrepo untracks the file |
|
1056 | 1056 | $ echo c19 > s/f19 |
|
1057 | 1057 | $ hg add s/f19 |
|
1058 | 1058 | $ hg st -S |
|
1059 | 1059 | A s/f19 |
|
1060 | 1060 | $ hg forget s/f19 |
|
1061 | 1061 | $ hg st -S |
|
1062 | 1062 | ? s/f19 |
|
1063 | 1063 | $ rm s/f19 |
|
1064 | 1064 | $ cd .. |
|
1065 | 1065 | |
|
1066 | 1066 | Courtesy phases synchronisation to publishing server does not block the push |
|
1067 | 1067 | (issue3781) |
|
1068 | 1068 | |
|
1069 | 1069 | $ cp -r main issue3781 |
|
1070 | 1070 | $ cp -r main issue3781-dest |
|
1071 | 1071 | $ cd issue3781-dest/s |
|
1072 | 1072 | $ hg phase tip # show we have draft changeset |
|
1073 | 1073 | 5: draft |
|
1074 | 1074 | $ chmod a-w .hg/store/phaseroots # prevent phase push |
|
1075 | 1075 | $ cd ../../issue3781 |
|
1076 | 1076 | $ cat >> .hg/hgrc << EOF |
|
1077 | 1077 | > [paths] |
|
1078 | 1078 | > default=../issue3781-dest/ |
|
1079 | 1079 | > EOF |
|
1080 | 1080 | $ hg push |
|
1081 | pushing to $TESTTMP/issue3781-dest | |
|
1081 | pushing to $TESTTMP/issue3781-dest (glob) | |
|
1082 | 1082 | pushing subrepo s to $TESTTMP/issue3781-dest/s |
|
1083 | 1083 | searching for changes |
|
1084 | 1084 | no changes found |
|
1085 | 1085 | searching for changes |
|
1086 | 1086 | no changes found |
|
1087 | 1087 | [1] |
|
1088 | 1088 |
General Comments 0
You need to be logged in to leave comments.
Login now