Rev 520: merge new index button. in file:///data/jelmer/bzr-gtk/trunk/
Jelmer Vernooij
jelmer at samba.org
Sun Jun 29 23:44:08 BST 2008
At file:///data/jelmer/bzr-gtk/trunk/
------------------------------------------------------------
revno: 520
revision-id: jelmer at samba.org-20080629224406-fvs8eyq9ey7l6lkp
parent: jelmer at samba.org-20080629223909-puqp6u30f74zskhd
parent: jelmer at samba.org-20080629193429-ir2ilmbko6qkubg5
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Mon 2008-06-30 00:44:06 +0200
message:
merge new index button.
modified:
NEWS news-20070325173539-3va57o99cz3o57xe-1
viz/branchwin.py branchwin.py-20051016222514-15fd120652fcf25c
------------------------------------------------------------
revno: 511.6.1
revision-id: jelmer at samba.org-20080629193429-ir2ilmbko6qkubg5
parent: jelmer at samba.org-20080628154539-l5lkvs5qwuf2zx1m
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Sun 2008-06-29 21:34:29 +0200
message:
Add Branch/Index option if bzr-search is available.
modified:
viz/branchwin.py branchwin.py-20051016222514-15fd120652fcf25c
=== modified file 'NEWS'
--- a/NEWS 2008-06-29 22:39:09 +0000
+++ b/NEWS 2008-06-29 22:44:06 +0000
@@ -6,6 +6,9 @@
* Show progress bars in bzr viz window (Chad Miller, Jelmer Vernooij)
+ * Added menu option for indexing branches if bzr-search is present.
+ (Jelmer Vernooij)
+
BUG FIXES
* Replace _() calls by _i18n() calls. (Vincent Ladeuil, #187283)
=== modified file 'viz/branchwin.py'
--- a/viz/branchwin.py 2008-06-06 17:46:26 +0000
+++ b/viz/branchwin.py 2008-06-29 19:34:29 +0000
@@ -18,9 +18,10 @@
from bzrlib.plugins.gtk.tags import AddTagDialog
from bzrlib.plugins.gtk.preferences import PreferencesWindow
from bzrlib.plugins.gtk.branchview import TreeView, treemodel
+
+from bzrlib.config import BranchConfig, GlobalConfig
from bzrlib.revision import Revision, NULL_REVISION
-from bzrlib.config import BranchConfig
-from bzrlib.config import GlobalConfig
+from bzrlib.trace import mutter
class BranchWindow(Window):
"""Branch window.
@@ -228,6 +229,15 @@
branch_menu.add(gtk.MenuItem("Pu_ll Revisions"))
branch_menu.add(gtk.MenuItem("Pu_sh Revisions"))
+ try:
+ from bzrlib.plugins import search
+ except ImportError:
+ mutter("Didn't find search plugin")
+ else:
+ branch_index_menuitem = gtk.MenuItem("_Index")
+ branch_index_menuitem.connect('activate', self._branch_index_cb)
+ branch_menu.add(branch_index_menuitem)
+
help_menu = gtk.Menu()
help_menuitem = gtk.MenuItem("_Help")
help_menuitem.set_submenu(help_menu)
@@ -456,6 +466,10 @@
finally:
self.treeview.set_sensitive(True)
+ def _branch_index_cb(self, w):
+ from bzrlib.plugins.search import index as _mod_index
+ _mod_index.index_url(self.branch.base)
+
def _about_dialog_cb(self, w):
from bzrlib.plugins.gtk.about import AboutDialog
More information about the bazaar-commits
mailing list