~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2011-09-25 03:13:49 UTC
  • Revision ID: aaron@aaronbentley.com-20110925031349-a3n39pq16ih54fwn
Rename 'branches' to list-branches, keep 'branches' as alias if not built in.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
"""
20
20
 
21
21
from bzrlib import ignores, option
22
 
from bzrlib.commands import plugin_cmds
 
22
from bzrlib.commands import (
 
23
    builtin_command_names,
 
24
    plugin_cmds,
 
25
    )
23
26
from version import version_info, __version__
24
27
 
25
28
 
27
30
 
28
31
 
29
32
commands = {
30
 
    'cmd_branches': [],
31
33
    'cmd_branch_history': [],
32
34
    'cmd_cbranch': [],
33
35
    'cmd_cdiff': [],
53
55
    plugin_cmds.register_lazy(cmd_name, aliases,
54
56
                              'bzrlib.plugins.bzrtools.command_classes')
55
57
 
 
58
list_branches_aliases = (['branches'] if 'branches' not in
 
59
                         builtin_command_names() else [])
 
60
 
 
61
plugin_cmds.register_lazy('cmd_list_branches', list_branches_aliases,
 
62
                          'bzrlib.plugins.bzrtools.command_classes')
56
63
 
57
64
plugin_cmds.register_lazy('cmd_heads', [], 'bzrlib.plugins.bzrtools.heads')
58
65