/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: Jelmer Vernooij
  • Date: 2007-04-03 17:16:07 UTC
  • mfrom: (187 trunk)
  • mto: This revision was merged to the branch mainline in revision 188.
  • Revision ID: jelmer@samba.org-20070403171607-0zaskazouokrm4cq
Tags: bzr-gtk-0.15.2
PrepareĀ forĀ 0.15.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
import bzrlib
18
18
 
19
 
__version__ = '0.15.1'
 
19
__version__ = '0.15.2'
20
20
version_info = tuple(int(n) for n in __version__.split('.'))
21
21
 
22
22
 
252
252
    aliases = ["gblame", "gpraise"]
253
253
    
254
254
    def run(self, filename, all=False, plain=False, line='1', revision=None):
255
 
        self.open_display()
 
255
        gtk = self.open_display()
256
256
 
257
257
        try:
258
258
            line = int(line)
349
349
 
350
350
    def run(self, path='.'):
351
351
        import os
352
 
        self.open_display()
 
352
        gtk = self.open_display()
353
353
        from status import StatusDialog
354
354
        (wt, wt_path) = workingtree.WorkingTree.open_containing(path)
355
355
        status = StatusDialog(wt, wt_path)
462
462
        broadcast_service = bus.get_object(
463
463
            activity.Broadcast.DBUS_NAME,
464
464
            activity.Broadcast.DBUS_PATH)
465
 
        def catch_branch(revision_id, url):
 
465
        def catch_branch(revision_id, urls):
 
466
            # TODO: show all the urls, or perhaps choose the 'best'.
 
467
            url = urls[0]
466
468
            try:
467
469
                if isinstance(revision_id, unicode):
468
470
                    revision_id = revision_id.encode('utf8')
469
471
                transport = get_transport(url)
470
 
                try:
471
 
                    transport.local_abspath('.')
472
 
                except errors.TransportNotPossible:
473
 
                    # dont show remote urls for now.
474
 
                    return
475
 
                # here we should:
476
472
                a_dir = BzrDir.open_from_transport(transport)
477
473
                branch = a_dir.open_branch()
478
474
                revno = branch.revision_id_to_revno(revision_id)
484
480
                body += '\n'
485
481
                body += revision.message
486
482
                body = cgi.escape(body)
487
 
                #print repr(body)
488
483
                nw = pynotify.Notification(summary, body)
489
484
                nw.set_timeout(5000)
490
485
                nw.show()