Mercurial > hg
comparison tests/test-subrepo.t @ 15447:9910f60a37ee
tests: make (glob) on windows accept \ instead of /
Globbing is usually used for filenames, so on windows it is reasonable and very
convenient that glob patterns accepts '\' or '/' when the pattern specifies
'/'.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 07 Nov 2011 03:25:10 +0100 |
parents | 9e99d2bbb1b1 |
children | d90b0b30464b |
comparison
equal
deleted
inserted
replaced
15446:c5c9ca3719f9 | 15447:9910f60a37ee |
---|---|
47 | 47 |
48 Revert currently ignores subrepos by default | 48 Revert currently ignores subrepos by default |
49 | 49 |
50 $ hg revert -a | 50 $ hg revert -a |
51 $ hg revert -R s -a -C | 51 $ hg revert -R s -a -C |
52 reverting s/a | 52 reverting s/a (glob) |
53 | 53 |
54 Issue2022: update -C | 54 Issue2022: update -C |
55 | 55 |
56 $ echo b > s/a | 56 $ echo b > s/a |
57 $ hg sum | 57 $ hg sum |
90 branch: default | 90 branch: default |
91 commit: 1 subrepos | 91 commit: 1 subrepos |
92 update: (current) | 92 update: (current) |
93 $ hg ci -m2 | 93 $ hg ci -m2 |
94 committing subrepository s | 94 committing subrepository s |
95 committing subrepository s/ss | 95 committing subrepository s/ss (glob) |
96 $ hg sum | 96 $ hg sum |
97 parent: 2:df30734270ae tip | 97 parent: 2:df30734270ae tip |
98 2 | 98 2 |
99 branch: default | 99 branch: default |
100 commit: (clean) | 100 commit: (clean) |
145 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 145 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
146 $ echo t = t >> .hgsub | 146 $ echo t = t >> .hgsub |
147 $ hg init t | 147 $ hg init t |
148 $ echo t > t/t | 148 $ echo t > t/t |
149 $ hg -R t add t | 149 $ hg -R t add t |
150 adding t/t | 150 adding t/t (glob) |
151 | 151 |
152 5 | 152 5 |
153 | 153 |
154 $ hg ci -m5 # add sub | 154 $ hg ci -m5 # add sub |
155 committing subrepository t | 155 committing subrepository t |
263 clone | 263 clone |
264 | 264 |
265 $ cd .. | 265 $ cd .. |
266 $ hg clone t tc | 266 $ hg clone t tc |
267 updating to branch default | 267 updating to branch default |
268 cloning subrepo s from $TESTTMP/sub/t/s | 268 cloning subrepo s from $TESTTMP/sub/t/s (glob) |
269 cloning subrepo s/ss from $TESTTMP/sub/t/s/ss | 269 cloning subrepo s/ss from $TESTTMP/sub/t/s/ss (glob) |
270 cloning subrepo t from $TESTTMP/sub/t/t | 270 cloning subrepo t from $TESTTMP/sub/t/t (glob) |
271 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | 271 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
272 $ cd tc | 272 $ cd tc |
273 $ hg debugsub | 273 $ hg debugsub |
274 path s | 274 path s |
275 source s | 275 source s |
282 | 282 |
283 $ echo bah > t/t | 283 $ echo bah > t/t |
284 $ hg ci -m11 | 284 $ hg ci -m11 |
285 committing subrepository t | 285 committing subrepository t |
286 $ hg push | 286 $ hg push |
287 pushing to $TESTTMP/sub/t | 287 pushing to $TESTTMP/sub/t (glob) |
288 pushing subrepo s/ss to $TESTTMP/sub/t/s/ss | 288 pushing subrepo s/ss to $TESTTMP/sub/t/s/ss (glob) |
289 searching for changes | 289 searching for changes |
290 no changes found | 290 no changes found |
291 pushing subrepo s to $TESTTMP/sub/t/s | 291 pushing subrepo s to $TESTTMP/sub/t/s (glob) |
292 searching for changes | 292 searching for changes |
293 no changes found | 293 no changes found |
294 pushing subrepo t to $TESTTMP/sub/t/t | 294 pushing subrepo t to $TESTTMP/sub/t/t (glob) |
295 searching for changes | 295 searching for changes |
296 adding changesets | 296 adding changesets |
297 adding manifests | 297 adding manifests |
298 adding file changes | 298 adding file changes |
299 added 1 changesets with 1 changes to 1 files | 299 added 1 changesets with 1 changes to 1 files |
307 | 307 |
308 $ echo bah > s/a | 308 $ echo bah > s/a |
309 $ hg ci -m12 | 309 $ hg ci -m12 |
310 committing subrepository s | 310 committing subrepository s |
311 $ hg push | 311 $ hg push |
312 pushing to $TESTTMP/sub/t | 312 pushing to $TESTTMP/sub/t (glob) |
313 pushing subrepo s/ss to $TESTTMP/sub/t/s/ss | 313 pushing subrepo s/ss to $TESTTMP/sub/t/s/ss (glob) |
314 searching for changes | 314 searching for changes |
315 no changes found | 315 no changes found |
316 pushing subrepo s to $TESTTMP/sub/t/s | 316 pushing subrepo s to $TESTTMP/sub/t/s (glob) |
317 searching for changes | 317 searching for changes |
318 abort: push creates new remote head 12a213df6fa9! | 318 abort: push creates new remote head 12a213df6fa9! |
319 (did you forget to merge? use push -f to force) | 319 (did you forget to merge? use push -f to force) |
320 [255] | 320 [255] |
321 $ hg push -f | 321 $ hg push -f |
322 pushing to $TESTTMP/sub/t | 322 pushing to $TESTTMP/sub/t (glob) |
323 pushing subrepo s/ss to $TESTTMP/sub/t/s/ss | 323 pushing subrepo s/ss to $TESTTMP/sub/t/s/ss (glob) |
324 searching for changes | 324 searching for changes |
325 no changes found | 325 no changes found |
326 pushing subrepo s to $TESTTMP/sub/t/s | 326 pushing subrepo s to $TESTTMP/sub/t/s (glob) |
327 searching for changes | 327 searching for changes |
328 adding changesets | 328 adding changesets |
329 adding manifests | 329 adding manifests |
330 adding file changes | 330 adding file changes |
331 added 1 changesets with 1 changes to 1 files (+1 heads) | 331 added 1 changesets with 1 changes to 1 files (+1 heads) |
332 pushing subrepo t to $TESTTMP/sub/t/t | 332 pushing subrepo t to $TESTTMP/sub/t/t (glob) |
333 searching for changes | 333 searching for changes |
334 no changes found | 334 no changes found |
335 searching for changes | 335 searching for changes |
336 adding changesets | 336 adding changesets |
337 adding manifests | 337 adding manifests |
349 | 349 |
350 pull | 350 pull |
351 | 351 |
352 $ cd ../tc | 352 $ cd ../tc |
353 $ hg pull | 353 $ hg pull |
354 pulling from $TESTTMP/sub/t | 354 pulling from $TESTTMP/sub/t (glob) |
355 searching for changes | 355 searching for changes |
356 adding changesets | 356 adding changesets |
357 adding manifests | 357 adding manifests |
358 adding file changes | 358 adding file changes |
359 added 1 changesets with 1 changes to 1 files | 359 added 1 changesets with 1 changes to 1 files |
360 (run 'hg update' to get a working copy) | 360 (run 'hg update' to get a working copy) |
361 | 361 |
362 should pull t | 362 should pull t |
363 | 363 |
364 $ hg up | 364 $ hg up |
365 pulling subrepo t from $TESTTMP/sub/t/t | 365 pulling subrepo t from $TESTTMP/sub/t/t (glob) |
366 searching for changes | 366 searching for changes |
367 adding changesets | 367 adding changesets |
368 adding manifests | 368 adding manifests |
369 adding file changes | 369 adding file changes |
370 added 1 changesets with 1 changes to 1 files | 370 added 1 changesets with 1 changes to 1 files |
505 $ hg init testdelete/nested | 505 $ hg init testdelete/nested |
506 $ hg init testdelete/nested2 | 506 $ hg init testdelete/nested2 |
507 $ echo test > testdelete/nested/foo | 507 $ echo test > testdelete/nested/foo |
508 $ echo test > testdelete/nested2/foo | 508 $ echo test > testdelete/nested2/foo |
509 $ hg -R testdelete/nested add | 509 $ hg -R testdelete/nested add |
510 adding testdelete/nested/foo | 510 adding testdelete/nested/foo (glob) |
511 $ hg -R testdelete/nested2 add | 511 $ hg -R testdelete/nested2 add |
512 adding testdelete/nested2/foo | 512 adding testdelete/nested2/foo (glob) |
513 $ hg -R testdelete/nested ci -m test | 513 $ hg -R testdelete/nested ci -m test |
514 $ hg -R testdelete/nested2 ci -m test | 514 $ hg -R testdelete/nested2 ci -m test |
515 $ echo nested = nested > testdelete/.hgsub | 515 $ echo nested = nested > testdelete/.hgsub |
516 $ echo nested2 = nested2 >> testdelete/.hgsub | 516 $ echo nested2 = nested2 >> testdelete/.hgsub |
517 $ hg -R testdelete add | 517 $ hg -R testdelete add |
518 adding testdelete/.hgsub | 518 adding testdelete/.hgsub (glob) |
519 $ hg -R testdelete ci -m "nested 1 & 2 added" | 519 $ hg -R testdelete ci -m "nested 1 & 2 added" |
520 committing subrepository nested | 520 committing subrepository nested |
521 committing subrepository nested2 | 521 committing subrepository nested2 |
522 $ echo nested = nested > testdelete/.hgsub | 522 $ echo nested = nested > testdelete/.hgsub |
523 $ hg -R testdelete ci -m "nested 2 deleted" | 523 $ hg -R testdelete ci -m "nested 2 deleted" |
532 | 532 |
533 $ mkdir mercurial mercurial2 | 533 $ mkdir mercurial mercurial2 |
534 $ hg init nested_absolute | 534 $ hg init nested_absolute |
535 $ echo test > nested_absolute/foo | 535 $ echo test > nested_absolute/foo |
536 $ hg -R nested_absolute add | 536 $ hg -R nested_absolute add |
537 adding nested_absolute/foo | 537 adding nested_absolute/foo (glob) |
538 $ hg -R nested_absolute ci -mtest | 538 $ hg -R nested_absolute ci -mtest |
539 $ cd mercurial | 539 $ cd mercurial |
540 $ hg init nested_relative | 540 $ hg init nested_relative |
541 $ echo test2 > nested_relative/foo2 | 541 $ echo test2 > nested_relative/foo2 |
542 $ hg -R nested_relative add | 542 $ hg -R nested_relative add |
543 adding nested_relative/foo2 | 543 adding nested_relative/foo2 (glob) |
544 $ hg -R nested_relative ci -mtest2 | 544 $ hg -R nested_relative ci -mtest2 |
545 $ hg init main | 545 $ hg init main |
546 $ echo "nested_relative = ../nested_relative" > main/.hgsub | 546 $ echo "nested_relative = ../nested_relative" > main/.hgsub |
547 $ echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub | 547 $ echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub |
548 $ hg -R main add | 548 $ hg -R main add |
549 adding main/.hgsub | 549 adding main/.hgsub (glob) |
550 $ hg -R main ci -m "add subrepos" | 550 $ hg -R main ci -m "add subrepos" |
551 committing subrepository nested_absolute | 551 committing subrepository nested_absolute |
552 committing subrepository nested_relative | 552 committing subrepository nested_relative |
553 $ cd .. | 553 $ cd .. |
554 $ hg clone mercurial/main mercurial2/main | 554 $ hg clone mercurial/main mercurial2/main |
573 $ hg -R repo ci -Am1 | 573 $ hg -R repo ci -Am1 |
574 adding .hgsub | 574 adding .hgsub |
575 committing subrepository s | 575 committing subrepository s |
576 $ hg clone repo repo2 | 576 $ hg clone repo repo2 |
577 updating to branch default | 577 updating to branch default |
578 cloning subrepo s from $TESTTMP/sub/repo/s | 578 cloning subrepo s from $TESTTMP/sub/repo/s (glob) |
579 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 579 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
580 $ hg -q -R repo2 pull -u | 580 $ hg -q -R repo2 pull -u |
581 $ echo 1 > repo2/s/a | 581 $ echo 1 > repo2/s/a |
582 $ hg -R repo2/s ci -m2 | 582 $ hg -R repo2/s ci -m2 |
583 $ hg -q -R repo2/s push | 583 $ hg -q -R repo2/s push |
607 $ echo test > sub/repo/foo | 607 $ echo test > sub/repo/foo |
608 $ hg -R sub/repo add sub/repo/foo | 608 $ hg -R sub/repo add sub/repo/foo |
609 $ echo sub/repo = sub/repo > .hgsub | 609 $ echo sub/repo = sub/repo > .hgsub |
610 $ hg add .hgsub | 610 $ hg add .hgsub |
611 $ hg ci -mtest | 611 $ hg ci -mtest |
612 committing subrepository sub/repo | 612 committing subrepository sub/repo (glob) |
613 $ echo test >> sub/repo/foo | 613 $ echo test >> sub/repo/foo |
614 $ hg ci -mtest | 614 $ hg ci -mtest |
615 committing subrepository sub/repo | 615 committing subrepository sub/repo (glob) |
616 $ cd .. | 616 $ cd .. |
617 | 617 |
618 Create repo without default path, pull top repo, and see what happens on update | 618 Create repo without default path, pull top repo, and see what happens on update |
619 | 619 |
620 $ hg init issue1852b | 620 $ hg init issue1852b |
625 adding manifests | 625 adding manifests |
626 adding file changes | 626 adding file changes |
627 added 2 changesets with 3 changes to 2 files | 627 added 2 changesets with 3 changes to 2 files |
628 (run 'hg update' to get a working copy) | 628 (run 'hg update' to get a working copy) |
629 $ hg -R issue1852b update | 629 $ hg -R issue1852b update |
630 abort: default path for subrepository sub/repo not found | 630 abort: default path for subrepository sub/repo not found (glob) |
631 [255] | 631 [255] |
632 | 632 |
633 Pull -u now doesn't help | 633 Pull -u now doesn't help |
634 | 634 |
635 $ hg -R issue1852b pull -u issue1852a | 635 $ hg -R issue1852b pull -u issue1852a |
644 pulling from issue1852a | 644 pulling from issue1852a |
645 adding changesets | 645 adding changesets |
646 adding manifests | 646 adding manifests |
647 adding file changes | 647 adding file changes |
648 added 1 changesets with 2 changes to 2 files | 648 added 1 changesets with 2 changes to 2 files |
649 cloning subrepo sub/repo from issue1852a/sub/repo | 649 cloning subrepo sub/repo from issue1852a/sub/repo (glob) |
650 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 650 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
651 | 651 |
652 Try to push from the other side | 652 Try to push from the other side |
653 | 653 |
654 $ hg -R issue1852a push `pwd`/issue1852c | 654 $ hg -R issue1852a push `pwd`/issue1852c |
655 pushing to $TESTTMP/sub/issue1852c | 655 pushing to $TESTTMP/sub/issue1852c |
656 pushing subrepo sub/repo to $TESTTMP/sub/issue1852c/sub/repo | 656 pushing subrepo sub/repo to $TESTTMP/sub/issue1852c/sub/repo (glob) |
657 searching for changes | 657 searching for changes |
658 no changes found | 658 no changes found |
659 searching for changes | 659 searching for changes |
660 adding changesets | 660 adding changesets |
661 adding manifests | 661 adding manifests |