~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Martin Pool
  • Date: 2010-04-01 03:52:41 UTC
  • mto: This revision was merged to the branch mainline in revision 5128.
  • Revision ID: mbp@sourcefrog.net-20100401035241-3tm20pq8igsshf6s
version-info is lazily loaded

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
from bzrlib.workingtree import WorkingTree
61
61
""")
62
62
 
63
 
from bzrlib.commands import Command, display_command
 
63
from bzrlib.commands import (
 
64
    Command,
 
65
    builtin_command_registry,
 
66
    display_command,
 
67
    )
64
68
from bzrlib.option import (
65
69
    ListOption,
66
70
    Option,
5975
5979
            self.outf.write('%s %s\n' % (path, location))
5976
5980
 
5977
5981
 
5978
 
from bzrlib.cmd_version_info import cmd_version_info
 
5982
def _register_lazy_builtins():
 
5983
    # register lazy builtins from other modules; called at startup and should
 
5984
    # be only called once.
 
5985
    for (name, aliases, module_name) in [
 
5986
        ('cmd_bundle_info', [], 'bzrlib.bundle.commands'),
 
5987
        ('cmd_version_info', [], 'bzrlib.cmd_version_info'),
 
5988
        ]:
 
5989
        builtin_command_registry.register_lazy(name, aliases, module_name)
 
5990
 
 
5991
 
5979
5992
from bzrlib.conflicts import cmd_resolve, cmd_conflicts, restore
5980
5993
from bzrlib.foreign import cmd_dpush
5981
5994
from bzrlib.sign_my_commits import cmd_sign_my_commits