~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2005-11-09 20:48:24 UTC
  • Revision ID: aaron.bentley@utoronto.ca-20051109204824-ad8771b15f74b6f6
Renamed force-reweave-inventory to fix

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.')
86
85
    """
87
86
    aliases = ['fetch-missing']
88
87
    takes_args = ['branch?']
89
 
    takes_options = [Option('no-fix')]
90
 
    def run(self, branch=None, no_fix=False):
 
88
    def run(self, branch=None):
91
89
        from fetch_ghosts import fetch_ghosts
92
 
        fetch_ghosts(branch, no_fix)
 
90
        fetch_ghosts(branch)
93
91
 
94
92
strip_help="""Strip the smallest prefix containing num leading slashes  from \
95
93
each file name found in the patch file."""
142
140
        return s.unshelve()
143
141
 
144
142
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
143
    def run(self):
163
144
        import shell
164
 
        return shell.run_shell()
 
145
        shell.run_shell()
165
146
 
166
147
commands = [cmd_shelve, cmd_unshelve, cmd_clean_tree, cmd_graph_ancestry,
167
148
            cmd_fetch_ghosts, cmd_patch, cmd_shell, cmd_fix]
168
149
 
169
150
command_decorators = []
170
151
 
171
 
command_decorators = []
172
 
 
173
152
import bzrlib.builtins
174
153
if not hasattr(bzrlib.builtins, "cmd_annotate"):
175
154
    commands.append(annotate.cmd_annotate)
181
160
from errors import NoPyBaz
182
161
try:
183
162
    import baz_import
184
 
    commands.append(baz_import.cmd_baz_import_branch)
185
163
    commands.append(baz_import.cmd_baz_import)
186
164
 
187
165
except NoPyBaz:
203
181
 
204
182
 
205
183
def test_suite():
206
 
    import baz_import
207
 
    import tests
208
184
    from doctest import DocTestSuite
209
185
    from unittest import TestSuite, TestLoader
210
186
    import clean_tree
213
189
    result = TestSuite()
214
190
    result.addTest(DocTestSuite(bzrtools))
215
191
    result.addTest(clean_tree.test_suite())
216
 
    result.addTest(DocTestSuite(baz_import))
217
 
    result.addTest(tests.test_suite())
218
192
    result.addTest(TestLoader().loadTestsFromModule(shelf_tests))
219
193
    result.addTest(blackbox.test_suite())
220
194
    return result