~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to show_paths.py

  • Committer: Aaron Bentley
  • Date: 2008-04-11 00:03:51 UTC
  • Revision ID: aaron@aaronbentley.com-20080411000351-dmbvgmanygnphzgp
Add escaping to HTML output

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
Written by Alexander Belchenko, 2006
5
5
"""
6
6
 
7
 
from bzrlib.commands import Command, register_command
 
7
from bzrlib.commands import register_command
 
8
from command import BzrToolsCommand
8
9
from bzrlib.option import Option
9
10
 
10
11
 
45
46
#/def _bzr_system_info
46
47
 
47
48
 
48
 
class cmd_show_paths(Command):
 
49
class cmd_show_paths(BzrToolsCommand):
49
50
    """Show paths used by bzr itself and for current branch.
50
51
 
 
52
    The standard "bzr info" command now includes this functionality.
 
53
 
51
54
    If you run this command from branch you'll see
52
55
    saved path locations for current branch:
53
56
 
58
61
        * submit to   - default reference location for bundle generation
59
62
    """
60
63
 
61
 
    takes_options = [Option('system', help='Show full bzr system information'),
 
64
    takes_options = [Option('system',
 
65
                            help='Show full bzr system information.'),
62
66
                    ]
63
 
 
64
 
    def run(self, system=False):
 
67
    takes_args = ['branch?']
 
68
 
 
69
    hidden = True
 
70
 
 
71
    _see_also = ['info']
 
72
 
 
73
    def run(self, system=False, branch=u'.'):
65
74
        import sys
66
75
 
67
76
        from bzrlib.branch import Branch
82
91
            _bzr_system_info(to_file)
83
92
 
84
93
        try:
85
 
            try:
86
 
                branch = WorkingTree.open_containing(u'.')[0].branch
87
 
            except NoWorkingTree:
88
 
                branch = Branch.open_containing(u'.')[0]
89
 
 
 
94
            branch = Branch.open_containing(branch)[0]
90
95
 
91
96
            if system:
92
97
                print >>to_file