~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Samuel Bronson
  • Date: 2012-08-30 20:36:18 UTC
  • mto: (6015.57.3 2.4)
  • mto: This revision was merged to the branch mainline in revision 6558.
  • Revision ID: naesten@gmail.com-20120830203618-y2dzw91nqpvpgxvx
Update INSTALL for switch to Python 2.6 and up.

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(
154
 
            trunk_tree.branch.base, new_branch_revid)
 
153
        self.assertRevisionNotInRepository('mainline', new_branch_revid)
155
154
        self.assertRevisionInRepository('newbranch', new_branch_revid)
156
155
 
157
156
    def test_sprout_stacked_from_smart_server(self):
172
171
        self.assertRevisionNotInRepository('newbranch', trunk_revid)
173
172
        tree = new_dir.open_branch().create_checkout('local')
174
173
        new_branch_revid = tree.commit('something local')
175
 
        self.assertRevisionNotInRepository(trunk_tree.branch.user_url,
176
 
            new_branch_revid)
 
174
        self.assertRevisionNotInRepository('mainline', new_branch_revid)
177
175
        self.assertRevisionInRepository('newbranch', new_branch_revid)
178
176
 
179
177
    def test_unstack_fetches(self):
484
482
        rtree = target.repository.revision_tree('rev2')
485
483
        rtree.lock_read()
486
484
        self.addCleanup(rtree.unlock)
487
 
        self.assertEqual(
488
 
            'new content',
489
 
            rtree.get_file_text(rtree.path2id('a'), 'a'))
 
485
        self.assertEqual('new content', rtree.get_file_by_path('a').read())
490
486
        self.check_lines_added_or_present(target, 'rev2')
491
487
 
492
488
    def test_transform_fallback_location_hook(self):
515
511
            repo = self.make_repository('repo', shared=True)
516
512
        except errors.IncompatibleFormat:
517
513
            raise TestNotApplicable()
518
 
        if not repo._format.supports_nesting_repositories:
519
 
            raise TestNotApplicable()
520
514
        # Avoid make_branch, which produces standalone branches.
521
515
        bzrdir = self.make_bzrdir('repo/stack-on')
522
516
        try:
552
546
        self.assertEqual({}, repo.get_parent_map(['rev1']))
553
547
        # revision_history should work, even though the history is spread over
554
548
        # multiple repositories.
555
 
        self.assertEquals((2, 'rev2'), stacked.branch.last_revision_info())
 
549
        self.assertLength(2, stacked.branch.revision_history())
556
550
 
557
551
 
558
552
class TestStackingConnections(
574
568
        stacked.set_last_revision_info(1, 'rev-base')
575
569
        stacked_relative = self.make_branch('stacked_relative',
576
570
                                            format=self.bzrdir_format)
577
 
        stacked_relative.set_stacked_on_url(base_tree.branch.user_url)
 
571
        stacked_relative.set_stacked_on_url('../base')
578
572
        stacked.set_last_revision_info(1, 'rev-base')
579
573
        self.start_logging_connections()
580
574