This repository was archived by the owner on Nov 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
D7 feature revert breaks if only one branch name is set #344
Copy link
Copy link
Open
Labels
Description
The branches/sites on which feature reverting occurs is handled in the config.ini file (or buildtype.config.ini file). If, however, only one branch name is set, then feature reverting doesn't occur at all.
For example, if we have a prod.config.ini file which contains the following:
[Drupal]
drupal_version=7
fra=True
branches=prod
This is because of the following:
Lines 57 to 67 in b41d326
| if feature_branches is not None: | |
| revert_branches = [] | |
| if feature_branches == "*": | |
| revert_branches.append(branch) | |
| else: | |
| feature_branches = feature_branches.split(',') | |
| for each_branch in feature_branches: | |
| each_branch = each_branch.strip() | |
| revert_branches.append(each_branch) | |
| else: | |
| revert_branches = ['master', 'stage'] |
In particular,
feature_branches = feature_branches.split(',')If there isn't a comma in that option in the INI file, then there's nothing to split on. Therefore, the feature_branches variable is empty.
This can be worked around by simply making the list branches greater than one, i.e:
branches=stage,prod
Or by using the wildcard option:
branches=*
Providing the wildcard does work as intended, this may be less of a bug and more a documentation issue.