Bug 649262: Fix project branch config copying. r=lsblakk
authorChris AtLee <catlee@mozilla.com>
Tue, 12 Apr 2011 09:35:56 -0400
changeset 3907 27150df8225bf17418a688fc31d7fcdf6028a408
parent 3905 fef4f4ea2ef2cb46c97a1e50eba1ff57744cd551
child 3908 2cd087f712bc1ce855d8af4e2622db18214fecc3
push id3061
push usercatlee@mozilla.com
push dateTue, 12 Apr 2011 13:43:03 +0000
reviewerslsblakk
bugs649262
Bug 649262: Fix project branch config copying. r=lsblakk
mozilla/config.py
--- a/mozilla/config.py
+++ b/mozilla/config.py
@@ -713,29 +713,33 @@ for branch in BRANCHES.keys():
         elif key == 'mobile_platforms' and 'mobile_platforms' in BRANCHES[branch]:
             continue
         else:
             BRANCHES[branch][key] = deepcopy(value)
 
     for platform, platform_config in PLATFORM_VARS.items():
         if platform in BRANCHES[branch]['platforms']:
             for key, value in platform_config.items():
-                # put default platform set in all branches, but grab any project_branches.py overrides/additional keys
+                # put default platform set in all branches, but grab any
+                # project_branches.py overrides/additional keys
                 if branch in ACTIVE_PROJECT_BRANCHES and PROJECT_BRANCHES[branch].has_key('platforms'):
                     if platform in PROJECT_BRANCHES[branch]['platforms'].keys():
                         if key in PROJECT_BRANCHES[branch]['platforms'][platform].keys():
-                            value = deepcopy(PROJECT_BRANCHES[branch]['platforms'][platform])
-                        else:
-                            BRANCHES[branch]['platforms'][platform][key] = deepcopy(PROJECT_BRANCHES[branch]['platforms'][platform])
+                            value = deepcopy(PROJECT_BRANCHES[branch]['platforms'][platform][key])
                 else:
                     value = deepcopy(value)
                 if isinstance(value, str):
                     value = value % locals()
                 BRANCHES[branch]['platforms'][platform][key] = value
 
+            if branch in ACTIVE_PROJECT_BRANCHES and 'platforms' in PROJECT_BRANCHES[branch] and \
+                    PROJECT_BRANCHES[branch]['platforms'].has_key(platform):
+                for key, value in PROJECT_BRANCHES[branch]['platforms'][platform].items():
+                    BRANCHES[branch]['platforms'][platform][key] = deepcopy(value)
+
     for mobile_platform, mobile_platform_config in MOBILE_PLATFORM_VARS.items():
         if mobile_platform in BRANCHES[branch]['mobile_platforms'].keys():
             BRANCHES[branch]['mobile_platforms'][mobile_platform] = deepcopy(mobile_platform_config)
 
     # Copy in local config
     if branch in localconfig.BRANCHES:
         for key, value in localconfig.BRANCHES[branch].items():
             if key == 'platforms':