[MERGE] branch.has_explicit_nick

Robert Collins robertc at robertcollins.net
Fri Jun 30 07:50:36 BST 2006


I think its useful to discriminate between explicit and implicit nick
setting:

=== modified file
'bzrlib/branch.py'                                           
--- bzrlib/branch.py    2006-06-21 10:38:56 +0000
+++ bzrlib/branch.py    2006-06-24 17:44:08 +0000
@@ -599,6 +599,15 @@
             mainline_parent_id = revision_id
         return BranchCheckResult(self)
 
+    def has_explicit_nick(self):
+        """Does this branch have an explicitly set nickname.
+        
+        :return: True if it does.
+        """
+        cfg = self.tree_config()
+        nick = cfg.get_option("nickname")
+        return nick is not None
+
 

If this looks reasonable, I'll add an explicit test for it. (I have an
explicit test already where I wrote the code, but I didn't put it
against Branch. I'm now cleaning that code up, and factoring this onto
branch.)

-Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060630/fd8bfbb0/attachment.pgp 


More information about the bazaar mailing list