}
),
(
- ['-i', '--integration'],
+ ['--backport-to'],
{
- 'action': 'store_true',
- 'help': 'backport to integration instances'
+ 'action': 'store',
+ 'choices': ['integration', 'review', 'stable'],
+ 'default': 'stable',
+ 'help': 'which instances to backport to',
+ 'metavar': 'instances'
}
),
(
M = None
branch = args.branch
versions = args.versions
- integration = args.integration
+ backportto = args.backport_to
# If we don't have a branch, we need an instance
M = self.Wp.resolve(args.name)
# Integration?
if M:
- integration = M.isIntegration()
+ if M.isIntegration():
+ backportto = 'integration'
+
+ if M.isStable():
+ backportto = 'stable'
+
+ if M.isReview():
+ backportto = 'review'
def stashPop(stash):
"""Small helper to pop the stash has we have to do it in some different places"""
for v in versions:
# Gets the instance to cherry-pick to
- name = self.Wp.generateInstanceName(v, integration=integration)
+ name = self.Wp.generateInstanceName(v, purpose=backportto)
if not self.Wp.isMoodle(name):
logging.warning('Could not find instance %s for version %s' % (name, v))
continue