Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Merging Pull Requests

Chris O Mahony April 29, 2013

Hi,

We are usign Stash 2.0 to do Pull Requests. I am trying to merge a pull request but get the following error:

"lightweight_addons could not be merged to master automatically. Please clone UTF/utf, checkout master and merge lightweight_addons (or revision d8f839f5198121dd572e9b0981c3b5322ae1165d) manually, resolving any conflicts, and push the result."

I followed the instruction instructions and merge the branch manually and then pushed. When I go back to the pull request and click merge again it gives the same error. When i look at the diff in the pull request it shows the same diff (as if the merge did not work). When I look at the code in the repo it shows the merge.

Is there something I am missing here?

Chris

2 answers

0 votes
seb
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 30, 2013

How did you do "selected merge" - are you using a tool which is not the git command line client?

When you say "looks as if the merge is not there" do you mean to say that the diff is empty, or still the changes from lightweight_addons -> master?

If there is no diff, I suspect your merge tool is performing a rebase, which means that the changes will be applied to the master branch but the branch itself is not merged (this means that the commits on the branch are not part of the lineage of master.

Chris O Mahony May 7, 2013

Hi,

I used egit plugin for eclipse. The only way I could get around this was to decline the pull request. Egit had completed the merge so declining the pull request had no impact. Once complete I did another small pull request and it worked fine.

The only thing I can think of is that the Pull request was sitting there for a couple of weeks and maybe stash was unable to verify it when I tried to merge it at a later stage.

cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 8, 2013

Hi Chris,

That's very unusual. We would both expect the merge to work through the pull-request, if there are no conflicts, and the pull-request to close if you pushed your own local merge. Something is not behaving as it should.

If it happens again would you mind raising a support ticket with a support zip attached so we look at the issue further? Perhaps before you do it would be handy if you enabled debugging first and created the pull request again and/or push the merged branch before capturing the zip so we can see more information about what Stash is doing.

Cheers,

Charles

0 votes
seb
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 29, 2013

Hi Chris,

The first thing to note is that we changed the messaging for the conflict resolution instructions in Stash 2.3.1. They weren't necessarily wrong, however the instructions in Stash 2.0 recommended resolving conflicts in the target branch (master) and pushing these directly. The new instructions promote merging master into your branch and updating the pull request. Please see STASH-3083 for more details if you like.

So... assuming that you have followed the old Stash 2.0 instructions, pushing these changes to master should mark the pull request as merged (since you've merged "lightweight_addons" into "master" already). Ensure this is not the case by refreshing the page. If the pull request has not been updated, then we should investigate where you are pushing your local master branch to.

Run the following git command: git remote -v. If you have more than one remote, it might be possible that you are pushing your local master branch to the incorrect repository. You can update it by running git branch --set-upstream master origin/master (adapt as required)

hth

Chris O Mahony April 29, 2013

HI,

I appreciate your response. To explain what I did:

WE have master branch and the branch "lightweight_addons". To complete the merge I checked out master branch locally and then selected merge from "lightweigth_addons". This was succesful (no conflicts so I dont know why stash wouldnt do it). I then pushed my changes to origin server.

When I log into stash and slect master branch I can see the changes there. For some reason when I go back to the pull request and diff it, the file looks as if the merge is not there. I dont know if stash is caching the diff?

Chris

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events