/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_branch/test_stacking.py

  • Committer: Vincent Ladeuil
  • Date: 2011-11-24 15:48:29 UTC
  • mfrom: (6289 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6337.
  • Revision ID: v.ladeuil+lp@free.fr-20111124154829-avowjpsxdl8yp2vz
merge trunk resolving conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
150
150
        self.assertRevisionNotInRepository('newbranch', trunk_revid)
151
151
        tree = new_dir.open_branch().create_checkout('local')
152
152
        new_branch_revid = tree.commit('something local')
153
 
        self.assertRevisionNotInRepository('mainline', new_branch_revid)
 
153
        self.assertRevisionNotInRepository(
 
154
            trunk_tree.branch.base, new_branch_revid)
154
155
        self.assertRevisionInRepository('newbranch', new_branch_revid)
155
156
 
156
157
    def test_sprout_stacked_from_smart_server(self):
171
172
        self.assertRevisionNotInRepository('newbranch', trunk_revid)
172
173
        tree = new_dir.open_branch().create_checkout('local')
173
174
        new_branch_revid = tree.commit('something local')
174
 
        self.assertRevisionNotInRepository('mainline', new_branch_revid)
 
175
        self.assertRevisionNotInRepository(trunk_tree.branch.user_url,
 
176
            new_branch_revid)
175
177
        self.assertRevisionInRepository('newbranch', new_branch_revid)
176
178
 
177
179
    def test_unstack_fetches(self):
511
513
            repo = self.make_repository('repo', shared=True)
512
514
        except errors.IncompatibleFormat:
513
515
            raise TestNotApplicable()
 
516
        if not repo._format.supports_nesting_repositories:
 
517
            raise TestNotApplicable()
514
518
        # Avoid make_branch, which produces standalone branches.
515
519
        bzrdir = self.make_bzrdir('repo/stack-on')
516
520
        try:
546
550
        self.assertEqual({}, repo.get_parent_map(['rev1']))
547
551
        # revision_history should work, even though the history is spread over
548
552
        # multiple repositories.
549
 
        self.assertLength(2, stacked.branch.revision_history())
 
553
        self.assertEquals((2, 'rev2'), stacked.branch.last_revision_info())
550
554
 
551
555
 
552
556
class TestStackingConnections(
568
572
        stacked.set_last_revision_info(1, 'rev-base')
569
573
        stacked_relative = self.make_branch('stacked_relative',
570
574
                                            format=self.bzrdir_format)
571
 
        stacked_relative.set_stacked_on_url('../base')
 
575
        stacked_relative.set_stacked_on_url(base_tree.branch.user_url)
572
576
        stacked.set_last_revision_info(1, 'rev-base')
573
577
        self.start_logging_connections()
574
578