Mercurial > kallithea
changeset 2533:5a826060251f beta
redirect to pull-request overview after creation
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 02 Jul 2012 00:59:46 +0200 |
parents | 19de74e33fb0 |
children | 7dd87a2f7831 |
files | rhodecode/controllers/pullrequests.py |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/controllers/pullrequests.py Mon Jul 02 00:22:57 2012 +0200 +++ b/rhodecode/controllers/pullrequests.py Mon Jul 02 00:59:46 2012 +0200 @@ -135,18 +135,19 @@ try: model = PullRequestModel() - model.create(self.rhodecode_user.user_id, org_repo, + pull_request = model.create(self.rhodecode_user.user_id, org_repo, org_ref, other_repo, other_ref, revisions, reviewers, title, description) Session.commit() - h.flash(_('Pull request send'), category='success') + h.flash(_('Successfully opened new pull request'), + category='success') except Exception: - raise - h.flash(_('Error occured during sending pull request'), + h.flash(_('Error occurred during sending pull request'), category='error') log.error(traceback.format_exc()) - return redirect(url('changelog_home', repo_name=repo_name)) + return redirect(url('pullrequest_show', repo_name=other_repo, + pull_request_id=pull_request.pull_request_id)) def _load_compare_data(self, pull_request): """