~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Robert Collins
  • Date: 2009-02-24 05:37:17 UTC
  • mto: This revision was merged to the branch mainline in revision 4038.
  • Revision ID: robertc@robertcollins.net-20090224053717-sau62hnxgo2f1pzr
Create and use a RPC call to create branches on bzr servers rather than using VFS calls.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1850
1850
 
1851
1851
    def __str__(self):
1852
1852
        # Trim the newline
1853
 
        return self.get_format_string().rstrip()
 
1853
        return self.get_format_description().rstrip()
1854
1854
 
1855
1855
    def _supply_sub_formats_to(self, other_format):
1856
1856
        """Give other_format the same values for sub formats as this has.
2084
2084
            # target doesn't support stacking.  So force a branch that *can*
2085
2085
            # support stacking.
2086
2086
            from bzrlib.branch import BzrBranchFormat7
2087
 
            self._branch_format = BzrBranchFormat7()
2088
 
            mutter("using %r for stacking" % (self._branch_format,))
 
2087
            branch_format = BzrBranchFormat7()
 
2088
            self.set_branch_format(branch_format)
 
2089
            mutter("using %r for stacking" % (branch_format,))
2089
2090
            from bzrlib.repofmt import pack_repo
2090
2091
            if self.repository_format.rich_root_data:
2091
2092
                bzrdir_format_name = '1.6.1-rich-root'
2698
2699
 
2699
2700
    def get_format_description(self):
2700
2701
        return 'bzr remote bzrdir'
 
2702
 
 
2703
    def get_format_string(self):
 
2704
        raise NotImplementedError(self.get_format_string)
2701
2705
    
2702
2706
    @classmethod
2703
2707
    def probe_transport(klass, transport):
2764
2768
            result.rich_root_data = custom_format.rich_root_data
2765
2769
        return result
2766
2770
 
 
2771
    def get_branch_format(self):
 
2772
        result = BzrDirMetaFormat1.get_branch_format(self)
 
2773
        if not isinstance(result, remote.RemoteBranchFormat):
 
2774
            new_result = remote.RemoteBranchFormat()
 
2775
            new_result._custom_format = result
 
2776
            # cache the result
 
2777
            self.set_branch_format(new_result)
 
2778
            result = new_result
 
2779
        return result
 
2780
 
2767
2781
    repository_format = property(__return_repository_format,
2768
2782
        BzrDirMetaFormat1._set_repository_format) #.im_func)
2769
2783