Rev 630: Use _get_nick(local=True) rather than .nick to get at a branches' nick, since in file:///home/jelmer/bzr-gtk/trunk/

Jelmer Vernooij jelmer at samba.org
Mon May 4 21:07:25 BST 2009


At file:///home/jelmer/bzr-gtk/trunk/

------------------------------------------------------------
revno: 630
revision-id: jelmer at samba.org-20090504200658-n6hsag1soygn3n1o
parent: jelmer at samba.org-20090504171509-t8l49wio0s5yh0y6
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Mon 2009-05-04 22:06:58 +0200
message:
  Use _get_nick(local=True) rather than .nick to get at a branches' nick, since 
  the previous might check the nickname of the master branch, which will be slow.
modified:
  annotate/gannotate.py          xannotate.py-20051024072750-fe35acd6bb909bd3
  nautilus-bzr.py                __init__.py-20060412205316-7a81eb8ae29ffc79
  olive/__init__.py              __init__.py-20060925014013-13wdvwl8vi8gfqi1-2
  olive/menu.py                  menu.py-20060803101046-9idg5lu81o53za8y-1
  viz/branchwin.py               branchwin.py-20051016222514-15fd120652fcf25c
=== modified file 'annotate/gannotate.py'
--- a/annotate/gannotate.py	2008-04-29 08:17:01 +0000
+++ b/annotate/gannotate.py	2009-05-04 20:06:58 +0000
@@ -139,7 +139,7 @@
         current_revision.timestamp = time.time()
         current_revision.message = '[Not yet committed]'
         current_revision.parent_ids = tree.get_parent_ids()
-        current_revision.properties['branch-nick'] = self.branch.nick
+        current_revision.properties['branch-nick'] = self.branch._get_nick(local=True)
         current_revno = '%d?' % (self.branch.revno() + 1)
         repository = self.branch.repository
         if self.revision_id == CURRENT_REVISION:

=== modified file 'nautilus-bzr.py'
--- a/nautilus-bzr.py	2008-07-27 12:01:06 +0000
+++ b/nautilus-bzr.py	2009-05-04 20:06:58 +0000
@@ -86,7 +86,8 @@
 
         from bzrlib.plugins.gtk.diff import DiffWindow
         window = DiffWindow()
-        window.set_diff(tree.branch.nick, tree, tree.branch.basis_tree())
+        window.set_diff(tree.branch._get_nick(local=True), tree, 
+                        tree.branch.basis_tree())
         window.show()
 
         return

=== modified file 'olive/__init__.py'
--- a/olive/__init__.py	2008-10-28 15:11:19 +0000
+++ b/olive/__init__.py	2009-05-04 20:06:58 +0000
@@ -665,7 +665,8 @@
         """ Statistics/Differences... menu handler. """
         window = DiffWindow(parent=self.window)
         parent_tree = self.wt.branch.repository.revision_tree(self.wt.branch.last_revision())
-        window.set_diff(self.wt.branch.nick, self.wt, parent_tree)
+        window.set_diff(self.wt.branch._get_nick(local=True), self.wt, 
+                        parent_tree)
         window.show()
     
     def on_menuitem_stats_infos_activate(self, widget):

=== modified file 'olive/menu.py'
--- a/olive/menu.py	2008-07-24 19:33:17 +0000
+++ b/olive/menu.py	2009-05-04 20:06:58 +0000
@@ -310,7 +310,7 @@
         wt = WorkingTree.open_containing(self.path)[0]
         window = DiffWindow(self.app)
         parent_tree = wt.branch.repository.revision_tree(wt.branch.last_revision())
-        window.set_diff(wt.branch.nick, wt, parent_tree)
+        window.set_diff(wt.branch._get_nick(local=True), wt, parent_tree)
         window.set_file(wt.relpath(self.path + os.sep + self.selected))
         window.show()
     
@@ -367,7 +367,7 @@
         wt = WorkingTree.open_containing(self.path)[0]
         window = DiffWindow(self.app)
         parent_tree = wt.branch.repository.revision_tree(wt.branch.last_revision())
-        window.set_diff(wt.branch.nick, wt, parent_tree)
+        window.set_diff(wt.branch._get_nick(local=True), wt, parent_tree)
         window.show()
     
     def view_remote(self, action):

=== modified file 'viz/branchwin.py'
--- a/viz/branchwin.py	2009-04-10 01:35:07 +0000
+++ b/viz/branchwin.py	2009-05-04 20:06:58 +0000
@@ -55,7 +55,7 @@
         else:
             self.compact_view = False
 
-        self.set_title(branch.nick + " - revision history")
+        self.set_title(branch._get_nick(local=True) + " - revision history")
 
         # user-configured window size
         size = self._load_size('viz-window-size')
@@ -624,7 +624,7 @@
         rev_tree    = self.branch.repository.revision_tree(revid)
         parent_tree = self.branch.repository.revision_tree(parentid)
 
-        description = revid + " - " + self.branch.nick
+        description = revid + " - " + self.branch._get_nick(local=True)
         window.set_diff(description, rev_tree, parent_tree)
         window.show()
 




More information about the bazaar-commits mailing list