Rev 3: Allow having a master branch, and using that preferentially as the public location. in http://bzr.arbash-meinel.com/plugins/register

John Arbash Meinel john at arbash-meinel.com
Fri Mar 23 15:56:49 GMT 2007


At http://bzr.arbash-meinel.com/plugins/register

------------------------------------------------------------
revno: 3
revision-id: john at arbash-meinel.com-20070323155639-iacfnxdk9f70nhbi
parent: john at arbash-meinel.com-20070323153843-vanmpj8ff0r0l5m1
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: register
timestamp: Fri 2007-03-23 10:56:39 -0500
message:
  Allow having a master branch, and using that preferentially as the public location.
modified:
  __init__.py                    __init__.py-20060816173937-anpuzdybrrnsbg5x-1
-------------- next part --------------
=== modified file '__init__.py'
--- a/__init__.py	2007-03-23 15:38:43 +0000
+++ b/__init__.py	2007-03-23 15:56:39 +0000
@@ -135,6 +135,12 @@
 
 def get_public_location(a_branch, branch_config, repo_config):
     """Determine what the public location for this branch is"""
+    master_location = a_branch.get_bound_location()
+    if master_location is not None:
+        master_config = config.LocationConfig(master_location)
+        target_base = master_config.get_user_option('public_branch')
+        if target_base is not None:
+            return target_base
     target_base = branch_config.get_user_option('public_branch')
     if target_base is None:
         public_repo = repo_config.get_user_option('public_repository')



More information about the bazaar-commits mailing list