/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to commands.py

  • Committer: Mark Lee
  • Date: 2009-07-11 18:39:14 UTC
  • mto: This revision was merged to the branch mainline in revision 661.
  • Revision ID: bzr@lazymalevolence.com-20090711183914-zuii3et5skiv2njo
Re-ignore credits.pickle.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
from bzrlib import (
18
18
    branch,
19
19
    builtins,
 
20
    merge_directive,
20
21
    workingtree,
21
22
    )
22
23
from bzrlib.commands import (
25
26
    )
26
27
from bzrlib.errors import (
27
28
    BzrCommandError,
28
 
    NoWorkingTree,
29
29
    NotVersionedError,
30
30
    NoSuchFile,
31
31
    )
32
32
from bzrlib.option import Option
33
33
 
34
34
from bzrlib.plugins.gtk import (
35
 
    _i18n,
36
35
    open_display,
37
36
    import_pygtk,
38
37
    set_ui_factory,
199
198
    """GTK+ annotate.
200
199
    
201
200
    Browse changes to FILENAME line by line in a GTK+ window.
202
 
 
203
 
    Within the annotate window, you can use Ctrl-F to search for text, and 
204
 
    Ctrl-G to jump to a line by number.
205
201
    """
206
202
 
207
203
    takes_args = ["filename", "line?"]
273
269
    takes_options = []
274
270
 
275
271
    def run(self, filename=None):
 
272
        import os
276
273
        open_display()
277
274
        from commit import CommitDialog
 
275
        from bzrlib.errors import (BzrCommandError,
 
276
                                   NotBranchError,
 
277
                                   NoWorkingTree)
278
278
 
279
279
        wt = None
280
280
        br = None
310
310
    takes_options = ['revision']
311
311
 
312
312
    def run(self, path='.', revision=None):
 
313
        import os
313
314
        gtk = open_display()
314
315
        from bzrlib.plugins.gtk.status import StatusWindow
315
316
        (wt, wt_path) = workingtree.WorkingTree.open_containing(path)
431
432
            other_branch = local_branch.get_parent()
432
433
            
433
434
            if other_branch is None:
434
 
                raise BzrCommandError("No peer location known or specified.")
 
435
                raise errors.BzrCommandError("No peer location known or specified.")
435
436
        remote_branch = Branch.open_containing(other_branch)[0]
436
437
        set_ui_factory()
437
438
        local_branch.lock_read()
447
448
 
448
449
 
449
450
class cmd_ginit(GTKCommand):
450
 
    """ GTK+ init dialog
451
 
 
452
 
    Graphical user interface for initializing new branches.
453
 
 
454
 
    """
455
451
    def run(self):
456
452
        open_display()
457
453
        from initialize import InitDialog
460
456
 
461
457
 
462
458
class cmd_gtags(GTKCommand):
463
 
    """ GTK+ tags dialog 
464
 
 
465
 
    Graphical user interface to view, create, or remove tags.
466
 
 
467
 
    """
468
459
    def run(self):
469
460
        br = branch.Branch.open_containing('.')[0]
470
461