~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2005-11-10 21:04:19 UTC
  • Revision ID: aaron.bentley@utoronto.ca-20051110210419-a402638d94693825
Handled whitespace branch names better

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
from bzrlib.option import Option
12
12
import bzrlib.branch
13
13
from bzrlib.errors import BzrCommandError
 
14
sys.path.append(os.path.dirname(__file__))
14
15
from reweave_inventory import cmd_fix
15
 
sys.path.insert(0, os.path.realpath(os.path.join(os.path.dirname(__file__), 
16
 
                                                 "external")))
17
16
 
18
17
Option.OPTIONS['ignored'] = Option('ignored',
19
18
        help='delete all ignored files.')
139
138
    """
140
139
    def run(self):
141
140
        s = Shelf('.')
142
 
        return s.unshelve()
 
141
        s.unshelve()
143
142
 
144
143
class cmd_shell(bzrlib.commands.Command):
145
 
    """Begin an interactive shell tailored for bzr.
146
 
    Bzr commands can be used without typing bzr first, and will be run natively
147
 
    when possible.  Tab completion is tailored for bzr.  The shell prompt shows
148
 
    the branch nick, revno, and path.
149
 
 
150
 
    If it encounters any moderately complicated shell command, it will punt to
151
 
    the system shell.
152
 
 
153
 
    Example:
154
 
    $ bzr shell
155
 
    bzr bzrtools:287/> status
156
 
    modified:
157
 
      __init__.py
158
 
    bzr bzrtools:287/> status --[TAB][TAB]
159
 
    --all        --help       --revision   --show-ids
160
 
    bzr bzrtools:287/> status --
161
 
    """
162
144
    def run(self):
163
145
        import shell
164
146
        return shell.run_shell()
168
150
 
169
151
command_decorators = []
170
152
 
171
 
command_decorators = []
172
 
 
173
153
import bzrlib.builtins
174
154
if not hasattr(bzrlib.builtins, "cmd_annotate"):
175
155
    commands.append(annotate.cmd_annotate)
181
161
from errors import NoPyBaz
182
162
try:
183
163
    import baz_import
184
 
    commands.append(baz_import.cmd_baz_import_branch)
185
164
    commands.append(baz_import.cmd_baz_import)
186
165
 
187
166
except NoPyBaz:
203
182
 
204
183
 
205
184
def test_suite():
206
 
    import baz_import
207
 
    import tests
208
185
    from doctest import DocTestSuite
209
186
    from unittest import TestSuite, TestLoader
210
187
    import clean_tree
213
190
    result = TestSuite()
214
191
    result.addTest(DocTestSuite(bzrtools))
215
192
    result.addTest(clean_tree.test_suite())
216
 
    result.addTest(DocTestSuite(baz_import))
217
 
    result.addTest(tests.test_suite())
218
193
    result.addTest(TestLoader().loadTestsFromModule(shelf_tests))
219
194
    result.addTest(blackbox.test_suite())
220
195
    return result