/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 __init__.py

  • Committer: Martin Albisetti
  • Date: 2008-08-02 20:38:35 UTC
  • mfrom: (580.1.6 trunk)
  • mto: This revision was merged to the branch mainline in revision 581.
  • Revision ID: argentina@gmail.com-20080802203835-onmh3g4qee1x8kzv
Merge gloom patch from Jelmer

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
gconflicts        GTK+ conflicts. 
23
23
gdiff             Show differences in working tree in a GTK+ Window. 
24
24
ginit             Initialise a new branch.
 
25
gloom             GTK+ loom browse dialog
25
26
gmerge            GTK+ merge dialog
26
27
gmissing          GTK+ missing revisions dialog. 
27
28
gpreferences      GTK+ preferences dialog. 
172
173
    def run(self, location="."):
173
174
        (br, path) = branch.Branch.open_containing(location)
174
175
        open_display()
175
 
        from push import PushDialog
 
176
        from bzrlib.plugins.gtk.push import PushDialog
176
177
        dialog = PushDialog(br.repository, br.last_revision(), br)
177
178
        dialog.run()
178
179
 
179
180
 
 
181
class cmd_gloom(GTKCommand):
 
182
    """ GTK+ loom.
 
183
    
 
184
    """
 
185
    takes_args = [ "location?" ]
 
186
 
 
187
    def run(self, location="."):
 
188
        try:
 
189
            (tree, path) = workingtree.WorkingTree.open_containing(location)
 
190
            br = tree.branch
 
191
        except NoWorkingTree, e:
 
192
            (br, path) = branch.Branch.open_containing(location)
 
193
            tree = None
 
194
        open_display()
 
195
        from bzrlib.plugins.gtk.loom import LoomDialog
 
196
        dialog = LoomDialog(br, tree)
 
197
        dialog.run()
 
198
 
180
199
 
181
200
class cmd_gdiff(GTKCommand):
182
201
    """Show differences in working tree in a GTK+ Window.
548
567
    cmd_visualise
549
568
    ]
550
569
 
 
570
try:
 
571
    from bzrlib.plugins import loom
 
572
except ImportError:
 
573
    pass # Loom plugin doesn't appear to be present
 
574
else:
 
575
    commands.append(cmd_gloom)
 
576
 
551
577
for cmd in commands:
552
578
    register_command(cmd)
553
579