~bzr-eclipse/bzr-xmloutput/xmlls-verbose-mode

« back to all changes in this revision

Viewing changes to cmds.py

  • Committer: Guillermo Gonzalez
  • Author(s): Jelmer Vernooij
  • Date: 2011-12-19 21:45:35 UTC
  • mfrom: (159.1.1 trunk)
  • Revision ID: guillo.gonzo@gmail.com-20111219214535-22s7kxu00uc6ipz8
Removes the use of relative imports and avoids using lazy_import in a few places we're it doesn't make a difference.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
import info
24
24
import bzrlib
 
25
from bzrlib.option import Option
 
26
from bzrlib.commands import (
 
27
    Command,
 
28
    display_command,
 
29
    )
25
30
from bzrlib.lazy_import import lazy_import
26
31
lazy_import(globals(), """
27
32
import sys
28
33
from bzrlib import (
29
34
    builtins,
30
35
    bzrdir,
31
 
    commands,
32
 
    option,
33
36
    log,
34
37
    workingtree,
35
38
    errors
36
39
    )
37
40
 
38
 
from bzrlib.option import Option, custom_help
39
 
from bzrlib.commands import display_command
40
 
import logxml
41
 
import service
 
41
from bzrlib.plugins.xmloutput import (
 
42
    logxml,
 
43
    service,
 
44
    )
42
45
import socket
43
 
from xml_errors import handle_error_xml
44
46
""")
45
47
 
 
48
from bzrlib.plugins.xmloutput.xml_errors import handle_error_xml
46
49
 
47
50
version_info = info.bzr_plugin_version
48
51
plugin_name = info.bzr_plugin_name
49
52
 
50
 
null_option = option.Option('null',
51
 
                            help='Write an ascii NUL (\\0) as the final char.')
52
 
 
53
 
 
54
 
class cmd_xmlstatus(commands.Command):
 
53
null_option = Option('null',
 
54
                     help='Write an ascii NUL (\\0) as the final char.')
 
55
 
 
56
 
 
57
class cmd_xmlstatus(Command):
55
58
    """Display status summary.
56
59
 
57
60
    This reports on versioned and unknown files, reporting them
118
121
        self.outf.write('\n')
119
122
 
120
123
 
121
 
class cmd_xmlannotate(commands.Command):
 
124
class cmd_xmlannotate(Command):
122
125
    """Show the origin of each line in a file.
123
126
 
124
127
    This prints out the given file with an annotation on the left side
176
179
                branch.unlock()
177
180
 
178
181
 
179
 
class cmd_xmlmissing(commands.Command):
 
182
class cmd_xmlmissing(Command):
180
183
    """Show unmerged/unpulled revisions between two branches.
181
184
 
182
185
    OTHER_BRANCH may be local or remote.
212
215
        self.outf.write('\n')
213
216
 
214
217
 
215
 
class cmd_xmlinfo(commands.Command):
 
218
class cmd_xmlinfo(Command):
216
219
    """Show information about a working tree, branch or repository.
217
220
 
218
221
    This command will show all known locations and formats associated to the
247
250
        self.outf.write('\n')
248
251
 
249
252
 
250
 
class cmd_xmlplugins(commands.Command):
 
253
class cmd_xmlplugins(Command):
251
254
    """List the installed plugins.
252
255
 
253
256
    This command displays the list of installed plugins including
284
287
        self.outf.write('\n')
285
288
 
286
289
 
287
 
class cmd_xmlversion(commands.Command):
 
290
class cmd_xmlversion(Command):
288
291
    """Show version of bzr."""
289
292
    hidden = True
290
293
    encoding_type = 'replace'
383
386
            self.outf.write('\0')
384
387
        self.outf.write('\n')
385
388
 
386
 
class cmd_start_xmlrpc(commands.Command):
 
389
class cmd_start_xmlrpc(Command):
387
390
    """Start the xmlrpc service."""
388
391
 
389
392
    hidden = True
413
416
            self.server.shutdown()
414
417
 
415
418
 
416
 
class cmd_stop_xmlrpc(commands.Command):
 
419
class cmd_stop_xmlrpc(Command):
417
420
    """Stops a xmlrpc service."""
418
421
 
419
422
    hidden = True