From 5bf59d2c60f2d71f5f47c6a8e2a4d03e0849d560 Mon Sep 17 00:00:00 2001 From: Marcus Huewe Date: Thu, 30 Dec 2010 20:58:00 +0100 Subject: [PATCH] - change_request_state_template: support tgt_project and tgt_package in template (for backward compatibility the dst_ prefix is still supported) --- osc/conf.py | 4 ++-- osc/core.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/osc/conf.py b/osc/conf.py index 7c262298..ec7ee9df 100644 --- a/osc/conf.py +++ b/osc/conf.py @@ -269,13 +269,13 @@ apiurl = %(apiurl)s # template for an accepted submitrequest #submitrequest_accepted_template = Hi %%(who)s,\\n -# thanks for working on:\\t%%(dst_project)s/%%(dst_package)s. +# thanks for working on:\\t%%(tgt_project)s/%%(tgt_package)s. # SR %%(reqid)s has been accepted.\\n\\nYour maintainers # template for a declined submitrequest #submitrequest_declined_template = Hi %%(who)s,\\n # sorry your SR %%(reqid)s (request type: %%(type)s) for -# %%(dst_project)s/%%(dst_package)s has been declined because... +# %%(tgt_project)s/%%(tgt_package)s has been declined because... #review requests interactively (default: off) #request_show_review = 1 diff --git a/osc/core.py b/osc/core.py index c30a2d6a..84d5ab51 100644 --- a/osc/core.py +++ b/osc/core.py @@ -3520,11 +3520,11 @@ def change_request_state_template(req, newstate): tmpl = conf.config.get(tmpl_name, '') tmpl = tmpl.replace('\\t', '\t').replace('\\n', '\n') data = {'reqid': req.reqid, 'type': action.type, 'who': req.get_creator()} - # XXX: change also mapping key to tgt_ prefix if req.actions[0].type == 'submit': data.update({'src_project': action.src_project, 'src_package': action.src_package, 'src_rev': action.src_rev, 'dst_project': action.tgt_project, 'dst_package': action.tgt_package}) + 'tgt_project': action.tgt_project, 'tgt_package': action.tgt_package}) try: return tmpl % data except KeyError, e: