~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/registry.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:
16
16
 
17
17
"""Classes to provide name-to-object registry-like support."""
18
18
 
19
 
from __future__ import absolute_import
20
19
 
21
20
from bzrlib.pyutils import get_named_object
22
21
 
133
132
                      override_existing=False):
134
133
        """Register a new object to be loaded on request.
135
134
 
136
 
        :param key: This is the key to use to request the object later.
137
135
        :param module_name: The python path to the module. Such as 'os.path'.
138
136
        :param member_name: The member of the module to return.  If empty or
139
137
                None, get() will return the module itself.
140
138
        :param help: Help text for this entry. This may be a string or
141
139
                a callable.
142
 
        :param info: More information for this entry. Registry.get_info()
143
 
                can be used to get this information. Registry treats this as an
144
 
                opaque storage location (it is defined by the caller).
 
140
        :param info: More information for this entry. Registry
145
141
        :param override_existing: If True, replace the existing object
146
142
                with the new one. If False, if there is already something
147
143
                registered with the same key, raise a KeyError