~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-03-03 06:02:49 UTC
  • mfrom: (5672.1.7 branch-revs-to-fetch)
  • Revision ID: pqm@pqm.ubuntu.com-20110303060249-l2zou9i59742nrqf
(spiv) Add Branch.heads_to_fetch API and HPSS request. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
 
38
38
import bzrlib
39
39
from bzrlib import (
40
 
    branch,
41
40
    config,
42
41
    controldir,
43
42
    errors,
1737
1736
 
1738
1737
    _lock_class = lockable_files.TransportLock
1739
1738
 
 
1739
    fixed_components = True
 
1740
 
1740
1741
    def get_format_string(self):
1741
1742
        """See BzrDirFormat.get_format_string()."""
1742
1743
        return "Bazaar-NG branch, format 0.0.4\n"
1780
1781
class BzrDirFormatAllInOne(BzrDirFormat):
1781
1782
    """Common class for formats before meta-dirs."""
1782
1783
 
 
1784
    fixed_components = True
 
1785
 
1783
1786
    def initialize_on_transport_ex(self, transport, use_existing_dir=False,
1784
1787
        create_prefix=False, force_new_repo=False, stacked_on=None,
1785
1788
        stack_on_pwd=None, repo_format_name=None, make_working_trees=None,
1938
1941
 
1939
1942
    _lock_class = lockdir.LockDir
1940
1943
 
 
1944
    fixed_components = False
 
1945
 
1941
1946
    def __init__(self):
1942
1947
        self._workingtree_format = None
1943
1948
        self._branch_format = None
1957
1962
 
1958
1963
    def get_branch_format(self):
1959
1964
        if self._branch_format is None:
1960
 
            from bzrlib.branch import BranchFormat
1961
 
            self._branch_format = BranchFormat.get_default_format()
 
1965
            from bzrlib.branch import format_registry as branch_format_registry
 
1966
            self._branch_format = branch_format_registry.get_default()
1962
1967
        return self._branch_format
1963
1968
 
1964
1969
    def set_branch_format(self, format):
2044
2049
            if target_branch is None:
2045
2050
                if do_upgrade:
2046
2051
                    # TODO: bad monkey, hard-coded formats...
2047
 
                    new_branch_format = branch.BzrBranchFormat7()
 
2052
                    from bzrlib.branch import BzrBranchFormat7
 
2053
                    new_branch_format = BzrBranchFormat7()
2048
2054
            else:
2049
2055
                new_branch_format = target_branch._format
2050
2056
                if not new_branch_format.supports_stacking():
2119
2125
 
2120
2126
    def __get_workingtree_format(self):
2121
2127
        if self._workingtree_format is None:
2122
 
            from bzrlib.workingtree import WorkingTreeFormat
2123
 
            self._workingtree_format = WorkingTreeFormat.get_default_format()
 
2128
            from bzrlib.workingtree import (
 
2129
                format_registry as wt_format_registry,
 
2130
                )
 
2131
            self._workingtree_format = wt_format_registry.get_default()
2124
2132
        return self._workingtree_format
2125
2133
 
2126
2134
    def __set_workingtree_format(self, wt_format):