/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: Vincent Ladeuil
  • Date: 2009-05-06 11:51:38 UTC
  • mfrom: (628.1.2 gtk)
  • Revision ID: v.ladeuil+lp@free.fr-20090506115138-7abxvg2qz4gzraup
UpgradeĀ COMPATIBLE_BZR_VERSIONS

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
# along with this program; if not, write to the Free Software
13
13
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
14
14
 
15
 
import os
16
 
 
17
15
from bzrlib import (
18
16
    branch,
19
17
    builtins,
 
18
    merge_directive,
20
19
    workingtree,
21
20
    )
22
21
from bzrlib.commands import (
25
24
    )
26
25
from bzrlib.errors import (
27
26
    BzrCommandError,
28
 
    NoWorkingTree,
29
27
    NotVersionedError,
30
28
    NoSuchFile,
31
29
    )
32
30
from bzrlib.option import Option
33
31
 
34
32
from bzrlib.plugins.gtk import (
35
 
    _i18n,
36
33
    open_display,
37
34
    import_pygtk,
38
35
    set_ui_factory,
199
196
    """GTK+ annotate.
200
197
    
201
198
    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
199
    """
206
200
 
207
201
    takes_args = ["filename", "line?"]
273
267
    takes_options = []
274
268
 
275
269
    def run(self, filename=None):
 
270
        import os
276
271
        open_display()
277
272
        from commit import CommitDialog
 
273
        from bzrlib.errors import (BzrCommandError,
 
274
                                   NotBranchError,
 
275
                                   NoWorkingTree)
278
276
 
279
277
        wt = None
280
278
        br = None
310
308
    takes_options = ['revision']
311
309
 
312
310
    def run(self, path='.', revision=None):
 
311
        import os
313
312
        gtk = open_display()
314
313
        from bzrlib.plugins.gtk.status import StatusWindow
315
314
        (wt, wt_path) = workingtree.WorkingTree.open_containing(path)
431
430
            other_branch = local_branch.get_parent()
432
431
            
433
432
            if other_branch is None:
434
 
                raise BzrCommandError("No peer location known or specified.")
 
433
                raise errors.BzrCommandError("No peer location known or specified.")
435
434
        remote_branch = Branch.open_containing(other_branch)[0]
436
435
        set_ui_factory()
437
436
        local_branch.lock_read()
447
446
 
448
447
 
449
448
class cmd_ginit(GTKCommand):
450
 
    """ GTK+ init dialog
451
 
 
452
 
    Graphical user interface for initializing new branches.
453
 
 
454
 
    """
455
449
    def run(self):
456
450
        open_display()
457
451
        from initialize import InitDialog
460
454
 
461
455
 
462
456
class cmd_gtags(GTKCommand):
463
 
    """ GTK+ tags dialog 
464
 
 
465
 
    Graphical user interface to view, create, or remove tags.
466
 
 
467
 
    """
468
457
    def run(self):
469
458
        br = branch.Branch.open_containing('.')[0]
470
459