comparison tests/test-subrepo-svn.t @ 14820:7ef125fa9b35 stable

subrepo: correct revision in svn checkout A Subversion subrepo checkout uses a url and --revision which does not do the correct thing when specifying a revision of a branch that has since been deleted and recreated. The checkout needs to specify the revision as URL@REV instead.
author Eli Carter <eli.carter@tektronix.com>
date Thu, 30 Jun 2011 13:22:12 -0500
parents 0ae98cd2a83f
children d4addef0ec74
comparison
equal deleted inserted replaced
14819:b30c889584ef 14820:7ef125fa9b35
517 This is surprising, but is also correct based on the current code: 517 This is surprising, but is also correct based on the current code:
518 $ echo "updating should (maybe) fail" > obstruct/other 518 $ echo "updating should (maybe) fail" > obstruct/other
519 $ hg co tip 519 $ hg co tip
520 abort: crosses branches (merge branches or use --clean to discard changes) 520 abort: crosses branches (merge branches or use --clean to discard changes)
521 [255] 521 [255]
522
523 Point to a Subversion branch which has since been deleted and recreated
524 First, create that condition in the repository.
525
526 $ hg ci -m cleanup
527 committing subrepository obstruct
528 Sending obstruct/other
529 Transmitting file data .
530 Committed revision 7.
531 At revision 7.
532 $ svn mkdir -m "baseline" $SVNREPO/trunk
533
534 Committed revision 8.
535 $ svn copy -m "initial branch" $SVNREPO/trunk $SVNREPO/branch
536
537 Committed revision 9.
538 $ svn co --quiet "$SVNREPO"/branch tempwc
539 $ cd tempwc
540 $ echo "something old" > somethingold
541 $ svn add somethingold
542 A somethingold
543 $ svn ci -m 'Something old'
544 Adding somethingold
545 Transmitting file data .
546 Committed revision 10.
547 $ svn rm -m "remove branch" $SVNREPO/branch
548
549 Committed revision 11.
550 $ svn copy -m "recreate branch" $SVNREPO/trunk $SVNREPO/branch
551
552 Committed revision 12.
553 $ svn up
554 D somethingold
555 Updated to revision 12.
556 $ echo "something new" > somethingnew
557 $ svn add somethingnew
558 A somethingnew
559 $ svn ci -m 'Something new'
560 Adding somethingnew
561 Transmitting file data .
562 Committed revision 13.
563 $ cd ..
564 $ rm -rf tempwc
565 $ svn co "$SVNREPO/branch"@10 recreated
566 A recreated/somethingold
567 Checked out revision 10.
568 $ echo "recreated = [svn] $SVNREPO/branch" >> .hgsub
569 $ hg ci -m addsub
570 committing subrepository recreated
571 $ cd recreated
572 $ svn up
573 D somethingold
574 A somethingnew
575 Updated to revision 13.
576 $ cd ..
577 $ hg ci -m updatesub
578 committing subrepository recreated
579 $ hg up -r-2
580 D $TESTTMP/rebaserepo/recreated/somethingnew
581 A $TESTTMP/rebaserepo/recreated/somethingold
582 Checked out revision 10.
583 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
584 $ test -e recreated/somethingold
585