~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Ian Clatworthy
  • Date: 2007-12-07 05:53:45 UTC
  • mfrom: (3078.2.8 bzr.switch)
  • mto: This revision was merged to the branch mainline in revision 3093.
  • Revision ID: ian.clatworthy@internode.on.net-20071207055345-ek2m118pm79nowuf
switch for heavyweight checkouts

Show diffs side-by-side

added added

removed removed

Lines of Context:
868
868
        """
869
869
        return None
870
870
 
 
871
    @classmethod
 
872
    def set_reference(self, a_bzrdir, to_branch):
 
873
        """Set the target reference of the branch in a_bzrdir.
 
874
 
 
875
        format probing must have been completed before calling
 
876
        this method - it is assumed that the format of the branch
 
877
        in a_bzrdir is correct.
 
878
 
 
879
        :param a_bzrdir: The bzrdir to set the branch reference for.
 
880
        :param to_branch: branch that the checkout is to reference
 
881
        """
 
882
        raise NotImplementedError(self.set_reference)
 
883
 
871
884
    def get_format_string(self):
872
885
        """Return the ASCII format string that identifies this format."""
873
886
        raise NotImplementedError(self.get_format_string)
1198
1211
        transport = a_bzrdir.get_branch_transport(None)
1199
1212
        return transport.get('location').read()
1200
1213
 
 
1214
    def set_reference(self, a_bzrdir, to_branch):
 
1215
        """See BranchFormat.set_reference()."""
 
1216
        transport = a_bzrdir.get_branch_transport(None)
 
1217
        location = transport.put_bytes('location', to_branch.base)
 
1218
 
1201
1219
    def initialize(self, a_bzrdir, target_branch=None):
1202
1220
        """Create a branch of this format in a_bzrdir."""
1203
1221
        if target_branch is None:
1860
1878
        return None
1861
1879
 
1862
1880
    @classmethod
 
1881
    def set_reference(self, a_bzrdir, to_branch):
 
1882
        """Set the target reference of the branch in a_bzrdir.
 
1883
 
 
1884
        format probing must have been completed before calling
 
1885
        this method - it is assumed that the format of the branch
 
1886
        in a_bzrdir is correct.
 
1887
 
 
1888
        :param a_bzrdir: The bzrdir to set the branch reference for.
 
1889
        :param to_branch: branch that the checkout is to reference
 
1890
        """
 
1891
        raise NotImplementedError(self.set_reference)
 
1892
 
 
1893
    @classmethod
1863
1894
    def _initialize_control_files(cls, a_bzrdir, utf8_files, lock_filename,
1864
1895
            lock_class):
1865
1896
        branch_transport = a_bzrdir.get_branch_transport(cls)