~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_controldir/test_controldir.py

  • Committer: Jelmer Vernooij
  • Date: 2012-01-18 17:47:06 UTC
  • mto: (6437.3.9 2.5)
  • mto: This revision was merged to the branch mainline in revision 6444.
  • Revision ID: jelmer@samba.org-20120118174706-33pxrecbgbfd8ryx
UseĀ ControlDir.set_branch_reference.

Show diffs side-by-side

added added

removed removed

Lines of Context:
464
464
        referenced_branch = self.make_branch('referenced')
465
465
        dir = self.make_bzrdir('source')
466
466
        try:
467
 
            reference = bzrlib.branch.BranchReferenceFormat().initialize(dir,
468
 
                target_branch=referenced_branch)
 
467
            dir.set_branch_reference(referenced_branch)
469
468
        except errors.IncompatibleFormat:
470
469
            # this is ok too, not all formats have to support references.
471
470
            raise TestNotApplicable("control directory does not "
696
695
        referenced_branch = self.make_branch('referenced')
697
696
        dir = self.make_bzrdir('source')
698
697
        try:
699
 
            reference = bzrlib.branch.BranchReferenceFormat().initialize(dir,
700
 
                target_branch=referenced_branch)
 
698
            dir.set_branch_reference(referenced_branch)
701
699
        except errors.IncompatibleFormat:
702
700
            raise TestNotApplicable("format does not support branch "
703
701
                "references")
716
714
        referenced_tree.commit('1', rev_id='1', allow_pointless=True)
717
715
        dir = self.make_bzrdir('source')
718
716
        try:
719
 
            reference = bzrlib.branch.BranchReferenceFormat().initialize(dir,
720
 
                target_branch=referenced_tree.branch)
 
717
            dir.set_branch_reference(referenced_tree.branch)
721
718
        except errors.IncompatibleFormat:
722
719
            raise TestNotApplicable("format does not support branch "
723
720
                "references")
743
740
        referenced_tree.commit('1', rev_id='1', allow_pointless=True)
744
741
        dir = self.make_bzrdir('source')
745
742
        try:
746
 
            reference = bzrlib.branch.BranchReferenceFormat().initialize(dir,
747
 
                target_branch=referenced_tree.branch)
 
743
            dir.set_branch_reference(referenced_tree.branch)
748
744
        except errors.IncompatibleFormat:
749
745
            # this is ok too, not all formats have to support references.
750
746
            raise TestNotApplicable("format does not support "
895
891
        referenced_branch = self.make_branch('referencced')
896
892
        dir = self.make_bzrdir('source')
897
893
        try:
898
 
            reference = bzrlib.branch.BranchReferenceFormat().initialize(dir,
899
 
                target_branch=referenced_branch)
 
894
            dir.set_branch_reference(referenced_branch)
900
895
        except errors.IncompatibleFormat:
901
896
            # this is ok too, not all formats have to support references.
902
897
            raise TestNotApplicable("format does not support "
922
917
        referenced_branch = self.make_branch('referencced')
923
918
        dir = self.make_bzrdir('source')
924
919
        try:
925
 
            reference = bzrlib.branch.BranchReferenceFormat().initialize(dir,
926
 
                target_branch=referenced_branch)
 
920
            dir.set_branch_reference(referenced_branch)
927
921
        except errors.IncompatibleFormat:
928
922
            # this is ok too, not all formats have to support references.
929
923
            raise TestNotApplicable("format does not support "
1625
1619
        master = self.make_branch('branch')
1626
1620
        thisdir = self.make_bzrdir('this')
1627
1621
        try:
1628
 
            bzrlib.branch.BranchReferenceFormat().initialize(
1629
 
                thisdir, target_branch=master)
 
1622
            thisdir.set_branch_reference(master)
1630
1623
        except errors.IncompatibleFormat:
1631
1624
            raise TestNotApplicable("format does not support "
1632
1625
                "branch references")