~vila/bzr/832036-stack-registry

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-08-28 11:13:18 UTC
  • mfrom: (6105.1.1 branch-lazy-import)
  • Revision ID: pqm@pqm.ubuntu.com-20110828111318-tzo1k47rlx1xzxz9
(jameinel) Bug #835545,
 lazy_import modules rather than objects to allow pydoc to work. (Jelmer
 Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
from bzrlib.lazy_import import lazy_import
21
21
lazy_import(globals(), """
22
 
from itertools import chain
 
22
import itertools
23
23
from bzrlib import (
24
24
        bzrdir,
25
25
        cache_utf8,
35
35
        repository,
36
36
        revision as _mod_revision,
37
37
        rio,
 
38
        tag as _mod_tag,
38
39
        transport,
39
40
        ui,
40
41
        urlutils,
41
42
        )
42
 
from bzrlib.config import BranchConfig, TransportConfig
43
 
from bzrlib.tag import (
44
 
    BasicTags,
45
 
    DisabledTags,
46
 
    )
47
43
""")
48
44
 
49
45
from bzrlib import (
216
212
 
217
213
        :return: A bzrlib.config.BranchConfig.
218
214
        """
219
 
        return BranchConfig(self)
 
215
        return _mod_config.BranchConfig(self)
220
216
 
221
217
    def _get_config(self):
222
218
        """Get the concrete config for just the config in this branch.
514
510
                    # The decision to include the start or not
515
511
                    # depends on the stop_rule if a stop is provided
516
512
                    # so pop this node back into the iterator
517
 
                    rev_iter = chain(iter([node]), rev_iter)
 
513
                    rev_iter = itertools.chain(iter([node]), rev_iter)
518
514
                    break
519
515
        if stop_revision_id is None:
520
516
            # Yield everything
1679
1675
        Note that it is normal for branch to be a RemoteBranch when using tags
1680
1676
        on a RemoteBranch.
1681
1677
        """
1682
 
        return DisabledTags(branch)
 
1678
        return _mod_tag.DisabledTags(branch)
1683
1679
 
1684
1680
    def network_name(self):
1685
1681
        """A simple byte string uniquely identifying this format for RPC calls.
2125
2121
 
2126
2122
    def make_tags(self, branch):
2127
2123
        """See bzrlib.branch.BranchFormat.make_tags()."""
2128
 
        return BasicTags(branch)
 
2124
        return _mod_tag.BasicTags(branch)
2129
2125
 
2130
2126
    def supports_set_append_revisions_only(self):
2131
2127
        return True
2156
2152
 
2157
2153
    def make_tags(self, branch):
2158
2154
        """See bzrlib.branch.BranchFormat.make_tags()."""
2159
 
        return BasicTags(branch)
 
2155
        return _mod_tag.BasicTags(branch)
2160
2156
 
2161
2157
    def supports_set_append_revisions_only(self):
2162
2158
        return True
2203
2199
 
2204
2200
    def make_tags(self, branch):
2205
2201
        """See bzrlib.branch.BranchFormat.make_tags()."""
2206
 
        return BasicTags(branch)
 
2202
        return _mod_tag.BasicTags(branch)
2207
2203
 
2208
2204
    supports_reference_locations = False
2209
2205
 
2421
2417
    base = property(_get_base, doc="The URL for the root of this branch.")
2422
2418
 
2423
2419
    def _get_config(self):
2424
 
        return TransportConfig(self._transport, 'branch.conf')
 
2420
        return _mod_config.TransportConfig(self._transport, 'branch.conf')
2425
2421
 
2426
2422
    def is_locked(self):
2427
2423
        return self.control_files.is_locked()