From 2d8407bba4724e8a3ca927b5cbd569b45cb54fcf Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Apr 13 2015 20:17:15 +0000 Subject: Commit the merge at the end --- diff --git a/pagure/ui/fork.py b/pagure/ui/fork.py index bbef73e..269afcc 100644 --- a/pagure/ui/fork.py +++ b/pagure/ui/fork.py @@ -475,6 +475,7 @@ def merge_request_pull(repo, requestid, username=None): branch_ref.target = merge.fastforward_oid elif merge is None and mergecode is not None: branch_ref.set_target(repo_commit.oid.hex) + ori_remote.push(refname) flask.flash('Changes merged!') @@ -490,7 +491,13 @@ def merge_request_pull(repo, requestid, username=None): repo=repo.name, username=username, requestid=requestid)) - new_repo.lookup_reference('HEAD').get_object() + new_repo.create_commit( + 'refs/heads/master', + repo_commit.author, + repo_commit.committer, + 'Merge #%s `%s`' % (request.id, request.title), + tree, + [head.hex, repo_commit.oid.hex]) ori_remote.push(refname) flask.flash('Changes merged!')